diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-07-25 12:24:00 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-07-25 13:07:01 -0700 |
commit | f898ee7a374c20f58150158a5066f547060d9c24 (patch) | |
tree | 2660867079b0a36f4b4a27bfec1d5dd00cc1f521 /tangle | |
parent | d7297b82c57b7920d6cff9c22e87afe77451a786 (diff) | |
download | mu-f898ee7a374c20f58150158a5066f547060d9c24.tar.gz |
4403
Couple of improvements for the tangle/ directory: a) Start running tangle unit tests at build time again. b) Option to print out test names as they run, just like in top-level.
Diffstat (limited to 'tangle')
-rw-r--r-- | tangle/000test.cc | 7 | ||||
-rw-r--r-- | tangle/002main.cc | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/tangle/000test.cc b/tangle/000test.cc index 2754b254..64551646 100644 --- a/tangle/000test.cc +++ b/tangle/000test.cc @@ -1,7 +1,12 @@ typedef void (*test_fn)(void); const test_fn Tests[] = { - #include "test_list" // auto-generated; see makefile + #include "test_list" // auto-generated; see 'build*' scripts +}; + +// Names for each element of the 'Tests' global, respectively. +const string Test_names[] = { + #include "test_name_list" // auto-generated; see 'build*' scripts }; bool Passed = true; diff --git a/tangle/002main.cc b/tangle/002main.cc index c8c61039..4529c463 100644 --- a/tangle/002main.cc +++ b/tangle/002main.cc @@ -22,6 +22,7 @@ string flag_value(const string& flag, int argc, const char* argv[]) { int run_tests() { for (unsigned long i=0; i < sizeof(Tests)/sizeof(Tests[0]); ++i) { +//? cerr << "running " << Test_names[i] << '\n'; START_TRACING_UNTIL_END_OF_SCOPE; setup(); (*Tests[i])(); |