diff options
author | Adam Borowski <kilobyte@angband.pl> | 2010-12-06 11:31:37 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2010-12-07 01:51:57 +0100 |
commit | 46826205a23e2860e31a91485783959021f47520 (patch) | |
tree | 8cbccca22a759b09c9959ba2657b7b49f9ad9272 /crawl-ref/source/ctest.cc | |
parent | 23fe4239a93e43fdcedded995c8766e627b65157 (diff) | |
download | crawl-ref-46826205a23e2860e31a91485783959021f47520.tar.gz crawl-ref-46826205a23e2860e31a91485783959021f47520.zip |
Run zotdef's debug as part of the test suite.
Diffstat (limited to 'crawl-ref/source/ctest.cc')
-rw-r--r-- | crawl-ref/source/ctest.cc | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/crawl-ref/source/ctest.cc b/crawl-ref/source/ctest.cc index c707cf950b..a576fe3589 100644 --- a/crawl-ref/source/ctest.cc +++ b/crawl-ref/source/ctest.cc @@ -26,6 +26,7 @@ #include "ng-init.h" #include "state.h" #include "stuff.h" +#include "zotdef.h" #include <algorithm> #include <vector> @@ -126,6 +127,15 @@ namespace crawl_tests failures.push_back(file_error(file, dlua.error)); } + static bool _has_test(const std::string& test) + { + if (crawl_state.script) + return false; + if (crawl_state.tests_selected.empty()) + return true; + return crawl_state.tests_selected[0].find(test) != std::string::npos; + } + // Assumes curses has already been initialized. bool run_tests(bool exit_on_complete) { @@ -139,13 +149,10 @@ namespace crawl_tests init_test_bindings(); - if ((crawl_state.tests_selected.empty() - || (crawl_state.tests_selected[0].find("makeitem") != - std::string::npos)) - && !crawl_state.script) - { + if (_has_test("makeitem")) makeitem_tests(); - } + if (_has_test("zotdef_wave")) + debug_waves(); // Get a list of Lua files in test. Order of execution of // tests should be irrelevant. |