From 8246a55111430b3f409a1d56aefd456f6b7ada4e Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 16 Mar 2014 22:11:26 +0100 Subject: [PATCH 1/4] fix macro, use parens around arguments. --- CuTest.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CuTest.h b/CuTest.h index 8b32773..17e41b4 100644 --- a/CuTest.h +++ b/CuTest.h @@ -1,4 +1,4 @@ -#ifndef CU_TEST_H +ifndef CU_TEST_H #define CU_TEST_H #include @@ -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 */ From f1282541451fb0de71dd1d142f519d7f5ddf01eb Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 16 Mar 2014 22:26:12 +0100 Subject: [PATCH 2/4] fix header and add a makefile so I can test in isolation. --- CuTest.h | 2 +- Makefile | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/CuTest.h b/CuTest.h index 17e41b4..3866107 100644 --- a/CuTest.h +++ b/CuTest.h @@ -1,4 +1,4 @@ -ifndef CU_TEST_H +#ifndef CU_TEST_H #define CU_TEST_H #include diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3cc9d61 --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +# I am not very good at Makefiles. + +CFLAGS += -Wall -g +INCLUDES = -I. + +all: test + +bin: + mkdir -p $@ + +test: bin/CuTestTest + @bin/CuTestTest + +bin/CuTestTest: AllTests.c CuTestTest.c CuTest.c | bin + $(CC) $(CFLAGS) $(INCLUDES) -lm -o $@ $^ + +clean: + @rm -rf *~ bin From 0b718dde0939afdd1f424f5030fc1621d38ba6db Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 16 Mar 2014 22:27:30 +0100 Subject: [PATCH 3/4] add git support files --- .gitattributes | 15 +++++++++++++++ .gitignore | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..740e840 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,15 @@ +*.[hc] text +*.json text +*.xml text +*.py text +*.md text +*.txt text +*.lua text +*.bat text + +# Shell scripts should *always* be LF, regardless of platfrom +s/* text eol=lf +*.sh text eol=lf + +# All third-party code should not be EOL-normalized +#third-party/** -text diff --git a/.gitignore b/.gitignore index 1dd44ef..9800967 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ -*~ +*~ config +bin From d83cec09a52835274ab8ed4849de16fb8658982a Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 22 Mar 2014 01:54:37 -0700 Subject: [PATCH 4/4] crlf --- license.txt | 76 ++++++++++++++++++++++++++--------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/license.txt b/license.txt index 5f053ba..fd81689 100644 --- a/license.txt +++ b/license.txt @@ -1,38 +1,38 @@ -NOTE - -The license is based on the zlib/libpng license. For more details see -http://www.opensource.org/licenses/zlib-license.html. The intent of the -license is to: - -- keep the license as simple as possible -- encourage the use of CuTest in both free and commercial applications - and libraries -- keep the source code together -- give credit to the CuTest contributors for their work - -If you ship CuTest in source form with your source distribution, the -following license document must be included with it in unaltered form. -If you find CuTest useful we would like to hear about it. - -LICENSE - -Copyright (c) 2003 Asim Jalis - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not -claim that you wrote the original software. If you use this software in -a product, an acknowledgment in the product documentation would be -appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not -be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. +NOTE + +The license is based on the zlib/libpng license. For more details see +http://www.opensource.org/licenses/zlib-license.html. The intent of the +license is to: + +- keep the license as simple as possible +- encourage the use of CuTest in both free and commercial applications + and libraries +- keep the source code together +- give credit to the CuTest contributors for their work + +If you ship CuTest in source form with your source distribution, the +following license document must be included with it in unaltered form. +If you find CuTest useful we would like to hear about it. + +LICENSE + +Copyright (c) 2003 Asim Jalis + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software in +a product, an acknowledgment in the product documentation would be +appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not +be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution.