fix macro, use parens around arguments.

This commit is contained in:
Enno Rehling 2014-03-16 22:11:26 +01:00
parent 30c0fed288
commit 8246a55111

View File

@ -1,4 +1,4 @@
#ifndef CU_TEST_H
ifndef CU_TEST_H
#define CU_TEST_H
#include <setjmp.h>
@ -86,8 +86,8 @@ void CuAssertPtrEquals_LineMsg(CuTest* tc,
#define CuAssertPtrEquals(tc,ex,ac) CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac))
#define CuAssertPtrEquals_Msg(tc,ms,ex,ac) CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac))
#define CuAssertPtrNotNull(tc,p) CuAssert_Line((tc),__FILE__,__LINE__,"null pointer unexpected",(p != NULL))
#define CuAssertPtrNotNullMsg(tc,msg,p) CuAssert_Line((tc),__FILE__,__LINE__,(msg),(p != NULL))
#define CuAssertPtrNotNull(tc,p) CuAssert_Line((tc),__FILE__,__LINE__,"null pointer unexpected",((p) != NULL))
#define CuAssertPtrNotNullMsg(tc,msg,p) CuAssert_Line((tc),__FILE__,__LINE__,(msg),((p) != NULL))
/* CuSuite */