From 3fa4a31d147add8d88406a2b460e8b3c484b3c20 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 20 May 2012 03:21:38 +0200 Subject: [PATCH] trying to figure out why some run_tests tests are not working --- scripts/tests/common.lua | 6 +++--- src/gamecode/report.c | 1 + src/kernel/message.h | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/tests/common.lua b/scripts/tests/common.lua index fd7a92a32..0ae776197 100644 --- a/scripts/tests/common.lua +++ b/scripts/tests/common.lua @@ -471,11 +471,11 @@ function test_mallorn() process_orders() - assert(u1:get_item("log")==2) - assert(u2:get_item("log")==2) + assert_equal(2, u1:get_item("log")) + assert_equal(2, u2:get_item("log")) local mallorn_cfg = config.get_resource("mallorn") if mallorn_cfg then - assert(u3:get_item("mallorn")==1) + assert_equal(1, u3:get_item("mallorn")) else assert_equal(-1, u3:get_item("mallorn")) assert_equal(0, u3:get_item("log")) diff --git a/src/gamecode/report.c b/src/gamecode/report.c index e08b198d5..c1bd48acc 100644 --- a/src/gamecode/report.c +++ b/src/gamecode/report.c @@ -162,6 +162,7 @@ rparagraph(FILE * F, const char *str, ptrdiff_t indent, int hanging_indent, size_t length = REPORTWIDTH; const char *end, *begin; + if (!str) return; /* find out if there's a mark + indent already encoded in the string. */ if (!mark) { const char *x = str; diff --git a/src/kernel/message.h b/src/kernel/message.h index e860bd996..9820950be 100644 --- a/src/kernel/message.h +++ b/src/kernel/message.h @@ -33,7 +33,7 @@ extern "C" { typedef struct mlist { struct mlist *next; struct message *msg; - }; + } mlist; typedef struct message_list { struct mlist *begin, **end;