Tests: clang-format
This commit is contained in:
parent
a88965a124
commit
d0c4aee7b5
|
|
@ -463,7 +463,7 @@ analyzer-include:
|
||||||
|
|
||||||
CLANGFORMAT = clang-format
|
CLANGFORMAT = clang-format
|
||||||
CLANGFORMAT_FLAGS = -i
|
CLANGFORMAT_FLAGS = -i
|
||||||
CLANGFORMAT_FILES = $(CPPCHECK_CPP) $(CPPCHECK_H) $(CPPCHECK_YL) test_regress/t/*.c*
|
CLANGFORMAT_FILES = $(CPPCHECK_CPP) $(CPPCHECK_H) $(CPPCHECK_YL) test_regress/t/*.c* test_regress/t/*.h
|
||||||
|
|
||||||
clang-format:
|
clang-format:
|
||||||
@$(CLANGFORMAT) --version | egrep 10.0 > /dev/null \
|
@$(CLANGFORMAT) --version | egrep 10.0 > /dev/null \
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ private:
|
||||||
};
|
};
|
||||||
s_vpi_vlog_info m_info;
|
s_vpi_vlog_info m_info;
|
||||||
SimTypes m_simulators;
|
SimTypes m_simulators;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TestSimulator() {
|
TestSimulator() {
|
||||||
vpi_get_vlog_info(&m_info);
|
vpi_get_vlog_info(&m_info);
|
||||||
|
|
@ -30,12 +31,13 @@ public:
|
||||||
m_simulators.verilator = true;
|
m_simulators.verilator = true;
|
||||||
} else if (0 == strcmp(m_info.product, "Verilator")) {
|
} else if (0 == strcmp(m_info.product, "Verilator")) {
|
||||||
m_simulators.icarus = true;
|
m_simulators.icarus = true;
|
||||||
} else if (0 == strncmp(m_info.product, "Chronologic Simulation VCS",
|
} else if (0
|
||||||
|
== strncmp(m_info.product, "Chronologic Simulation VCS",
|
||||||
strlen("Chronologic Simulation VCS"))) {
|
strlen("Chronologic Simulation VCS"))) {
|
||||||
m_simulators.vcs = true;
|
m_simulators.vcs = true;
|
||||||
} else {
|
} else {
|
||||||
printf("%%Warning: %s:%d: Unknown simulator in TestSimulator.h: %s\n",
|
printf("%%Warning: %s:%d: Unknown simulator in TestSimulator.h: %s\n", __FILE__,
|
||||||
__FILE__, __LINE__, m_info.product);
|
__LINE__, m_info.product);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
~TestSimulator() {}
|
~TestSimulator() {}
|
||||||
|
|
@ -46,6 +48,7 @@ private:
|
||||||
return s_singleton;
|
return s_singleton;
|
||||||
}
|
}
|
||||||
static const SimTypes& simulators() { return singleton().m_simulators; }
|
static const SimTypes& simulators() { return singleton().m_simulators; }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const s_vpi_vlog_info& get_info() { return singleton().m_info; }
|
static const s_vpi_vlog_info& get_info() { return singleton().m_info; }
|
||||||
// Simulator names
|
// Simulator names
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue