summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-04 14:51:23 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-04 14:51:23 -0800
commitc6d136cb11c6f33e437a6cd838509afad1effbbc (patch)
tree5dd1be18c7f0ee6e8e2ec02ba577cc4180ae83c3 /crawl-ref
parent0ae4b3ebec27a790336ec36b0d3ab594d66f620d (diff)
downloadcrawl-ref-c6d136cb11c6f33e437a6cd838509afad1effbbc.tar.gz
crawl-ref-c6d136cb11c6f33e437a6cd838509afad1effbbc.zip
Make tests compile with DEBUG_TESTS.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/acr.cc4
-rw-r--r--crawl-ref/source/makeitem.cc2
-rw-r--r--crawl-ref/source/makeitem.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 4fecc5f067..1dea9a5a38 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -3587,6 +3587,10 @@ static bool _initialise(void)
if (crawl_state.test)
{
+#if DEBUG_TESTS && !DEBUG
+#error "DEBUG must be defined if DEBUG_TESTS is defined"
+#endif
+
#if DEBUG_DIAGNOSTICS || DEBUG_TESTS
#ifdef USE_TILE
init_player_doll();
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc
index aa566ac2e6..5658739397 100644
--- a/crawl-ref/source/makeitem.cc
+++ b/crawl-ref/source/makeitem.cc
@@ -4899,7 +4899,7 @@ void item_set_appearance(item_def &item)
}
}
-#ifdef DEBUG_DIAGNOSTICS
+#if DEBUG_DIAGNOSTICS || DEBUG_TESTS
static int _test_item_level()
{
switch(random2(10))
diff --git a/crawl-ref/source/makeitem.h b/crawl-ref/source/makeitem.h
index 4aaa150d6d..05cde765c8 100644
--- a/crawl-ref/source/makeitem.h
+++ b/crawl-ref/source/makeitem.h
@@ -36,7 +36,7 @@ void item_set_appearance(item_def &item);
bool is_weapon_brand_ok(int type, int brand);
bool is_armour_brand_ok(int type, int brand);
-#ifdef DEBUG_DIAGNOSTICS
+#if DEBUG_DIAGNOSTICS || DEBUG_TESTS
void makeitem_tests();
#endif
#endif