[ccan] [PATCH 2/5] darray: test: only use darray_make_room() if we HAVE_STATEMENT_EXPR

Cody P Schafer dev at codyps.com
Mon Aug 17 09:22:56 AEST 2015


Essentially a clone of code provided by Rusty Russell <rusty at rustcorp.com.au>

CC: Joseph Adams <joeyadams3.14159 at gmail.com>
Signed-off-by: Cody P Schafer <dev at codyps.com>
---
 ccan/darray/test/run.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ccan/darray/test/run.c b/ccan/darray/test/run.c
index 3d96fa5..33f5b2a 100644
--- a/ccan/darray/test/run.c
+++ b/ccan/darray/test/run.c
@@ -214,6 +214,7 @@ int main(void) {
 	}
 	reset(arr);
 	
+#if HAVE_STATEMENT_EXPR
 	testing(darray_make_room);
 	{
 		for (i=0; i < ARRAY_SIZE(lotsOfStrings); i++) {
@@ -233,6 +234,9 @@ int main(void) {
 		ok1(!strcmp(str.item, amalgams.stringsF));
 	}
 	reset(str);
+#else
+	skip(3, "Need HAVE_STATEMENT_EXPR to test darray_make_room");
+#endif
 	
 	testing(darray_appends, darray_prepends, darray_pop_check);
 	{
-- 
2.5.0



More information about the ccan mailing list