diff options
author | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-02 22:52:32 -0800 |
---|---|---|
committer | Matthew Cline <zelgadis@sourceforge.net> | 2009-11-02 22:52:32 -0800 |
commit | 27c812572cca68a61a9d0450dabcfb209e3bae7c (patch) | |
tree | e15b4ff9ae30173415d6463a9615c50f71e8ae1b /crawl-ref/source | |
parent | 218e102a067374b201c1e0da32d1d8179f59047a (diff) | |
download | crawl-ref-27c812572cca68a61a9d0450dabcfb209e3bae7c.tar.gz crawl-ref-27c812572cca68a61a9d0450dabcfb209e3bae7c.zip |
Allow running tests with DEBUG_TESTS
Automatic/unit tests can now be run if you define the macro DEBUG_TESTS,
rather than only having the option of having to define
DEBUG_DIAGNOSTICS.
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/acr.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/ctest.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/ctest.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 06383b6d69..15809fab90 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -3583,7 +3583,7 @@ static bool _initialise(void) if (crawl_state.test) { -#ifdef DEBUG_DIAGNOSTICS +#if DEBUG_DIAGNOSTICS || DEBUG_TESTS #ifdef USE_TILE init_player_doll(); tiles.initialise_items(); @@ -3595,7 +3595,8 @@ static bool _initialise(void) end(0, false); #else end(1, false, "Non-debug Crawl cannot run tests. " - "Please use a debug build"); + "Please use a debug build (defined FULLDEBUG, DEBUG_DIAGNOSTIC " + "or DEBUG_TESTS)"); #endif } diff --git a/crawl-ref/source/ctest.cc b/crawl-ref/source/ctest.cc index a15b973f56..fee7a41003 100644 --- a/crawl-ref/source/ctest.cc +++ b/crawl-ref/source/ctest.cc @@ -14,7 +14,7 @@ #include "AppHdr.h" -#if DEBUG_DIAGNOSTICS +#if DEBUG_DIAGNOSTICS || DEBUG_TESTS #include "clua.h" #include "dlua.h" diff --git a/crawl-ref/source/ctest.h b/crawl-ref/source/ctest.h index 6caa3cf00c..2987104c11 100644 --- a/crawl-ref/source/ctest.h +++ b/crawl-ref/source/ctest.h @@ -1,7 +1,7 @@ #ifndef CTEST_H #define CTEST_H -#ifdef DEBUG_DIAGNOSTICS +#if DEBUG_DIAGNOSTICS || DEBUG_TESTS namespace crawl_tests { |