aceunit-commit Mailing List for AceUnit (Page 8)
Status: Beta
Brought to you by:
christianhujer
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(139) |
Nov
(77) |
Dec
(32) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(55) |
Feb
(11) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
(75) |
Nov
(57) |
Dec
(21) |
2009 |
Jan
(14) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(24) |
Sep
(11) |
Oct
(1) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
(21) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
From: <chr...@us...> - 2008-10-19 13:16:18
|
Revision: 408 http://aceunit.svn.sourceforge.net/aceunit/?rev=408&view=rev Author: christianhujer Date: 2008-10-19 13:16:08 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Unified main()s regarding interface, doxygen documentation and return. Modified Paths: -------------- trunk/src/native/test/basic/RunTests.c trunk/src/native/test/basicEmbedded/RunTests.c trunk/src/native/test/comment/RunTests.c trunk/src/native/test/exhand/TryExceptionHandling.c trunk/src/native/test/longjmp/LongJmpTest.c trunk/src/native/test/loop/AceUnitLoopTest.c trunk/src/native/test/printf/AceUnitPrintfTest.c trunk/src/native/test/recursive/TestMain.c trunk/src/native/test/twoFixtures/RunTests.c trunk/src/native/test/xmlLog/XmlLogTest.c Modified: trunk/src/native/test/basic/RunTests.c =================================================================== --- trunk/src/native/test/basic/RunTests.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/basic/RunTests.c 2008-10-19 13:16:08 UTC (rev 408) @@ -25,7 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** Test executor for AceUnit unit test "basic". +/** Test executor for AceUnit unit test "basicEmbedded". * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @file */ @@ -52,9 +52,9 @@ * @note This is only here temporarily. * @note Command line arguments currently are ignored. * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). + * @return Exit status. + * @retval 0 if all tests ran successfully. + * @retval 1 if there were test errors or failures. */ int main(void) { int retVal = 0; Modified: trunk/src/native/test/basicEmbedded/RunTests.c =================================================================== --- trunk/src/native/test/basicEmbedded/RunTests.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/basicEmbedded/RunTests.c 2008-10-19 13:16:08 UTC (rev 408) @@ -52,9 +52,9 @@ * @note This is only here temporarily. * @note Command line arguments currently are ignored. * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). + * @return Exit status. + * @retval 0 if all tests ran successfully. + * @retval 1 if there were test errors or failures. */ int main(void) { int retVal = 0; @@ -73,4 +73,3 @@ } return retVal; } - Modified: trunk/src/native/test/comment/RunTests.c =================================================================== --- trunk/src/native/test/comment/RunTests.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/comment/RunTests.c 2008-10-19 13:16:08 UTC (rev 408) @@ -42,9 +42,9 @@ * @note This is only here temporarily. * @note Command line arguments currently are ignored. * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). + * @return Exit status. + * @retval 0 if all tests ran successfully. + * @retval 1 if there were test errors or failures. */ int main(void) { int retVal = 0; Modified: trunk/src/native/test/exhand/TryExceptionHandling.c =================================================================== --- trunk/src/native/test/exhand/TryExceptionHandling.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/exhand/TryExceptionHandling.c 2008-10-19 13:16:08 UTC (rev 408) @@ -4,7 +4,7 @@ #include <stdio.h> #include <stdbool.h> -int main(int argc, char *argv[]) { +int main(void) { int count = 0; assert(++count == 1); /* should be reached. */ try { Modified: trunk/src/native/test/longjmp/LongJmpTest.c =================================================================== --- trunk/src/native/test/longjmp/LongJmpTest.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/longjmp/LongJmpTest.c 2008-10-19 13:16:08 UTC (rev 408) @@ -59,15 +59,16 @@ * @note This is only here temporarily. * @note Command line arguments currently are ignored. * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). + * @return Exit status. + * @retval 0 if all tests ran successfully. + * @retval 1 if there were test errors or failures. */ -int main(int argc, char *argv[]) { +int main(void) { + int retVal = 0; runFixture(&LongJmpTestFixture); if (runnerData->testCaseFailureCount != 2) { fprintf(stderr, "Test Cases: %d Errors: %d (expecting 2)\n", runnerData->testCaseCount, runnerData->testCaseFailureCount); - return 1; + retVal = 1; } - return 0; + return retVal; } Modified: trunk/src/native/test/loop/AceUnitLoopTest.c =================================================================== --- trunk/src/native/test/loop/AceUnitLoopTest.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/loop/AceUnitLoopTest.c 2008-10-19 13:16:08 UTC (rev 408) @@ -73,11 +73,9 @@ } /** Main program. - * @param argc argument count (ignored). - * @param argv argument values. - * @return Return value, 0 if the test is successful, other value if wrong. +* @return Return value, 0 if the test is successful, other value if wrong. */ -int main(int argc, char *argv[]) { +int main(void) { int retVal = 0; runFixture(&AceUnitLoopTestFixture); if (runnerData->testCaseFailureCount != 0) { Modified: trunk/src/native/test/printf/AceUnitPrintfTest.c =================================================================== --- trunk/src/native/test/printf/AceUnitPrintfTest.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/printf/AceUnitPrintfTest.c 2008-10-19 13:16:08 UTC (rev 408) @@ -55,11 +55,11 @@ * @note This is only here temporarily. * @note Command line arguments currently are ignored. * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). + * @return Exit status. + * @retval 0 if all tests ran successfully. + * @retval 1 if there were test errors or failures. */ -int main(int argc, char *argv[]) { +int main(void) { int retVal = 0; runFixture(&AceUnitTestFixture); if (runnerData->testCaseFailureCount != 0) { Modified: trunk/src/native/test/recursive/TestMain.c =================================================================== --- trunk/src/native/test/recursive/TestMain.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/recursive/TestMain.c 2008-10-19 13:16:08 UTC (rev 408) @@ -54,17 +54,16 @@ extern void runFixtures(const TestFixture_t *const fixtures[]); /** Main program. - * @param argc Argument count (number of command line arguments including program name). - * @param argv Argument values. - * @return Return code, 0 for success, 1 for failure. - * Failure means the number of test cases expected to fail and the number of test cases that actually failed differ. + * @return Exit status. + * @retval 0 if all tests ran successfully. + * @retval 1 if there were test errors or failures. */ -int main(int argc, char *argv[]) { +int main(void) { + int retVal = 0; runFixtures(fixtures); if (runnerData->testCaseFailureCount != 0) { fprintf(stderr, "Error: %d test cases failed.\n", (int) runnerData->testCaseFailureCount); - return 1; - } else { - return 0; + retVal = 1; } + return retVal; } Modified: trunk/src/native/test/twoFixtures/RunTests.c =================================================================== --- trunk/src/native/test/twoFixtures/RunTests.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/twoFixtures/RunTests.c 2008-10-19 13:16:08 UTC (rev 408) @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, Christian Hujer +/* Copyright (c) 2008, Christian Hujer * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,10 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/** Unit Test for AceUnit. - * Yes, AceUnit can be tested using itself. +/** Test executor for AceUnit unit test "twoFixtures". * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @file AceUnitTest.c + * @file */ #include <stdbool.h> @@ -46,16 +45,17 @@ * @note This is only here temporarily. * @note Command line arguments currently are ignored. * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). + * @return Exit status. + * @retval 0 if all tests ran successfully. + * @retval 1 if there were test errors or failures. */ int main(void) { + int retVal = 0; runFixture(&Fixture1Fixture); runFixture(&Fixture2Fixture); if (runnerData->testCaseFailureCount != 0) { fprintf(stderr, "Test Cases: %d Errors: %d\n", (int) runnerData->testCaseCount, (int) runnerData->testCaseFailureCount); - return 1; + retVal = 1; } - return 0; + return retVal; } Modified: trunk/src/native/test/xmlLog/XmlLogTest.c =================================================================== --- trunk/src/native/test/xmlLog/XmlLogTest.c 2008-10-19 12:58:51 UTC (rev 407) +++ trunk/src/native/test/xmlLog/XmlLogTest.c 2008-10-19 13:16:08 UTC (rev 408) @@ -49,17 +49,18 @@ * @note This is only here temporarily. * @note Command line arguments currently are ignored. * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). + * @return Exit status. + * @retval 0 if all tests ran successfully. + * @retval 1 if there were test errors or failures. */ -int main(int argc, char *argv[]) { +int main(void) { + int retVal = 0; globalLogger->runnerStarted(); runFixture(&XmlLogTestFixture); globalLogger->runnerEnded(); if (runnerData->testCaseFailureCount != 1) { fprintf(stderr, "Test Cases: %d Expected Errors: 1 Errors: %d\n", runnerData->testCaseCount, runnerData->testCaseFailureCount); - return 1; + retVal = 1; } - return 0; + return retVal; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 12:58:56
|
Revision: 407 http://aceunit.svn.sourceforge.net/aceunit/?rev=407&view=rev Author: christianhujer Date: 2008-10-19 12:58:51 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Fixed Exceptionhandling comment bug. Now it again works with C89. Modified Paths: -------------- trunk/src/native/ExceptionHandling.c Modified: trunk/src/native/ExceptionHandling.c =================================================================== --- trunk/src/native/ExceptionHandling.c 2008-10-19 12:39:58 UTC (rev 406) +++ trunk/src/native/ExceptionHandling.c 2008-10-19 12:58:51 UTC (rev 407) @@ -45,4 +45,4 @@ * If you work in a single-threaded environment, still make sure that setjmp() is invoked at least once, otherwise your system will get very upset * about uncaught exceptions. */ -jmp_buf *currentExceptionBuffer = &exceptionBuffer; //lint !e545 The & is required on platforms where jmp_buf is not an array. +jmp_buf *currentExceptionBuffer = &exceptionBuffer; /*lint !e545 The & is required on platforms where jmp_buf is not an array.*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 12:40:04
|
Revision: 406 http://aceunit.svn.sourceforge.net/aceunit/?rev=406&view=rev Author: christianhujer Date: 2008-10-19 12:39:58 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Updated comment test to the new scheme. Modified Paths: -------------- trunk/src/native/test/comment/AceUnitConfig.h trunk/src/native/test/comment/CommentTest.c trunk/src/native/test/comment/Makefile Added Paths: ----------- trunk/src/native/test/comment/RunTests.c Modified: trunk/src/native/test/comment/AceUnitConfig.h =================================================================== --- trunk/src/native/test/comment/AceUnitConfig.h 2008-10-19 12:15:14 UTC (rev 405) +++ trunk/src/native/test/comment/AceUnitConfig.h 2008-10-19 12:39:58 UTC (rev 406) @@ -1,2 +0,0 @@ -/** Let AceUnit use its own C99 definitions. */ -#define ACEUNIT_INTERNAL_ISO_TYPES Modified: trunk/src/native/test/comment/CommentTest.c =================================================================== --- trunk/src/native/test/comment/CommentTest.c 2008-10-19 12:15:14 UTC (rev 405) +++ trunk/src/native/test/comment/CommentTest.c 2008-10-19 12:39:58 UTC (rev 406) @@ -58,20 +58,3 @@ //} A_Test void test5() {} - -/** Run the tests. - * @note This is only here temporarily. - * @note Command line arguments currently are ignored. - * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). - */ -int main(int argc, char *argv[]) { - runFixture(&CommentTestFixture); - if (runnerData->testCaseFailureCount != 0) { - fprintf(stderr, "Test Cases: %d Errors: %d\n", runnerData->testCaseCount, runnerData->testCaseFailureCount); - return 1; - } - return 0; -} Modified: trunk/src/native/test/comment/Makefile =================================================================== --- trunk/src/native/test/comment/Makefile 2008-10-19 12:15:14 UTC (rev 405) +++ trunk/src/native/test/comment/Makefile 2008-10-19 12:39:58 UTC (rev 406) @@ -1,62 +1,59 @@ LOGGER=FullPlainLogger - -ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar - -ACE_UNIT_PATH=../../../ - +FIXTURE_NAMES=CommentTest +ACE_UNIT_PATH=../../.. ACE_UNIT_JAVA_SRC=$(shell find $(ACE_UNIT_PATH)/java/src -name "*.java") +$(shell java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar .) -FIXTURE_NAME=CommentTest +LINT=splint -CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" +PARTS=\ + AceUnit \ + AceUnitData \ + $(LOGGER) \ + $(FIXTURE_NAMES) -all: prepare compile test +VPATH=$(ACE_UNIT_PATH)/native -clean: - rm -f $(ACE_UNIT_FILES) $(FIXTURE_NAME).h runTests *.gcov *.gcno *.gcda +OBJECTS=$(addsuffix .o,$(PARTS)) -prepare: $(ACE_UNIT_FILES) +LINTOUTS=$(addsuffix .ln,$(PARTS)) -AceUnit.c: $(ACE_UNIT_PATH)/native/AceUnit.c - cp $< $@ +CPPFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" -I . -I $(ACE_UNIT_PATH)/native -AceUnit.h: $(ACE_UNIT_PATH)/native/AceUnit.h - cp $< $@ +C_and_LD_FLAGS=-fprofile-arcs -AceUnitData.c: $(ACE_UNIT_PATH)/native/AceUnitData.c - cp $< $@ +CFLAGS=-fdiagnostics-show-option -std=c99 -pedantic $(C_and_LD_FLAGS) -ftest-coverage -W -Wall -g -AceUnitData.h: $(ACE_UNIT_PATH)/native/AceUnitData.h - cp $< $@ +LDFLAGS=$(C_and_LD_FLAGS) -AceUnitAnnotations.h: $(ACE_UNIT_PATH)/native/AceUnitAnnotations.h - cp $< $@ +LINTFLAGS=-badflag -nolib -AceUnitLogging.h: $(ACE_UNIT_PATH)/native/AceUnitLogging.h - cp $< $@ +.PHONY : all +all: test -$(LOGGER).c: $(ACE_UNIT_PATH)/native/$(LOGGER).c - cp $< $@ +RunTests: $(OBJECTS) -AceUnit.jar: $(ACE_UNIT_PATH)/java/AceUnit.jar - cp $(ACE_UNIT_PATH)/java/AceUnit.jar $@ - $(ACE_UNIT_PATH)/java/AceUnit.jar: $(ACE_UNIT_JAVA_SRC) ant -f $(ACE_UNIT_PATH)/java/build.xml -compile: runTests +%.d: %.c + $(CPP) -M -MM -MG $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@ -$(FIXTURE_NAME).h: AceUnit.jar $(FIXTURE_NAME).c - java -jar AceUnit.jar $(FIXTURE_NAME) +coverage: test + gcov *.c -runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c99 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c +test: RunTests + ./RunTests -test: runTests - ./runTests +.PHONY : clean +clean: + rm -f $(addsuffix .h, $(FIXTURE_NAMES)) RunTests *.gcov *.gcno *.gcda *.o *.d Suite.h -doc: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - doxygen +.PHONY : lint +lint: $(LINTOUTS) -coverage: test - gcov *.c +$(OBJECTS) $(OBJECTS:.o=.d): Makefile + +ifneq ($(MAKECMDGOALS),clean) +-include $(OBJECTS:.o=.d) +endif Added: trunk/src/native/test/comment/RunTests.c =================================================================== --- trunk/src/native/test/comment/RunTests.c (rev 0) +++ trunk/src/native/test/comment/RunTests.c 2008-10-19 12:39:58 UTC (rev 406) @@ -0,0 +1,57 @@ +/* Copyright (c) 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** Test executor for AceUnit unit test "comment". + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @file + */ + +#include <stdbool.h> +#include <stdio.h> + +#include "AceUnitData.h" + +extern const TestFixture_t CommentTestFixture; + + +/** Run the tests. + * @note This is only here temporarily. + * @note Command line arguments currently are ignored. + * In future versions, this part will be auto-generated. + * @param argc Command line argument count. + * @param argv Command line argument values. + * @return Exit status (currently always 0). + */ +int main(void) { + int retVal = 0; + runFixture(&CommentTestFixture); + if (runnerData->testCaseFailureCount != 0) { + fprintf(stderr, "Test Cases: %d Errors: %d\n", runnerData->testCaseCount, runnerData->testCaseFailureCount); + retVal = 1; + } + return retVal; +} Property changes on: trunk/src/native/test/comment/RunTests.c ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 12:15:19
|
Revision: 405 http://aceunit.svn.sourceforge.net/aceunit/?rev=405&view=rev Author: christianhujer Date: 2008-10-19 12:15:14 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Improved Makefile. Improved configuration. Split tests and main. Modified Paths: -------------- trunk/src/native/test/basicEmbedded/AceUnitConfig.h trunk/src/native/test/basicEmbedded/AceUnitTest.c trunk/src/native/test/basicEmbedded/Makefile Added Paths: ----------- trunk/src/native/test/basicEmbedded/RunTests.c Modified: trunk/src/native/test/basicEmbedded/AceUnitConfig.h =================================================================== --- trunk/src/native/test/basicEmbedded/AceUnitConfig.h 2008-10-19 11:53:57 UTC (rev 404) +++ trunk/src/native/test/basicEmbedded/AceUnitConfig.h 2008-10-19 12:15:14 UTC (rev 405) @@ -1,5 +1,5 @@ -/** Let AceUnit use its own C99 definitions. */ -#define ACEUNIT_INTERNAL_ISO_TYPES +/** Use return to exit a test case with a failed assertion. */ +#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_RETURN /** Use an embedded configuration here. */ #define ACEUNIT_EMBEDDED Modified: trunk/src/native/test/basicEmbedded/AceUnitTest.c =================================================================== --- trunk/src/native/test/basicEmbedded/AceUnitTest.c 2008-10-19 11:53:57 UTC (rev 404) +++ trunk/src/native/test/basicEmbedded/AceUnitTest.c 2008-10-19 12:15:14 UTC (rev 405) @@ -34,21 +34,14 @@ #include <stdbool.h> #include <stdio.h> -#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_RETURN - #include "AceUnitData.h" #include "AceUnitTest.h" -/** The number of test cases contained in this fixture. - * This is used to verify that the number of executed test cases is correct. - */ -#define TEST_CASES_FOR_VERIFICATION 12 - /** The number of test cases that were executed. * This looks redundant with runnerData->testCaseCount but actually it is not. * It might be the case that the runner mistakenly executes the wrong methods, e.g. when the generator finds the wrong methods. */ -static int myTestCaseCount = 0; +int myTestCaseCount = 0; /** Clears the current recent error. */ void clearRecentError() { @@ -259,29 +252,3 @@ fail("Expected recentError to be set."); } } - -/** Run the tests. - * @note This is only here temporarily. - * @note Command line arguments currently are ignored. - * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). - */ -int main(int argc, char *argv[]) { - int retVal = 0; - runFixture(&AceUnitTestFixture); - if (runnerData->testCaseFailureCount != 0) { - fprintf(stderr, "Test Cases: %d Errors: %d\n", runnerData->testCaseCount, runnerData->testCaseFailureCount); - retVal = 1; - } - if (runnerData->testCaseCount != TEST_CASES_FOR_VERIFICATION) { - fprintf(stderr, "Test Cases: %d but expected %d\n", runnerData->testCaseCount, TEST_CASES_FOR_VERIFICATION); - retVal = 1; - } - if (myTestCaseCount != TEST_CASES_FOR_VERIFICATION) { - fprintf(stderr, "Test Cases really executed: %d but expected %d\n", myTestCaseCount, TEST_CASES_FOR_VERIFICATION); - retVal = 1; - } - return retVal; -} Modified: trunk/src/native/test/basicEmbedded/Makefile =================================================================== --- trunk/src/native/test/basicEmbedded/Makefile 2008-10-19 11:53:57 UTC (rev 404) +++ trunk/src/native/test/basicEmbedded/Makefile 2008-10-19 12:15:14 UTC (rev 405) @@ -1,62 +1,59 @@ LOGGER=MiniRamLogger - -ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar - -ACE_UNIT_PATH=../../../ - +FIXTURE_NAMES=AceUnitTest +ACE_UNIT_PATH=../../.. ACE_UNIT_JAVA_SRC=$(shell find $(ACE_UNIT_PATH)/java/src -name "*.java") +$(shell java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar .) -FIXTURE_NAME=AceUnitTest +LINT=splint -CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" +PARTS=\ + AceUnit \ + AceUnitData \ + $(LOGGER) \ + $(FIXTURE_NAMES) -all: prepare compile test +VPATH=$(ACE_UNIT_PATH)/native -clean: - rm -f $(ACE_UNIT_FILES) $(FIXTURE_NAME).h runTests *.gcov *.gcno *.gcda +OBJECTS=$(addsuffix .o,$(PARTS)) -prepare: $(ACE_UNIT_FILES) +LINTOUTS=$(addsuffix .ln,$(PARTS)) -AceUnit.c: $(ACE_UNIT_PATH)/native/AceUnit.c - cp $< $@ +CPPFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" -I . -I $(ACE_UNIT_PATH)/native -AceUnit.h: $(ACE_UNIT_PATH)/native/AceUnit.h - cp $< $@ +C_and_LD_FLAGS=-fprofile-arcs -AceUnitData.c: $(ACE_UNIT_PATH)/native/AceUnitData.c - cp $< $@ +CFLAGS=-fdiagnostics-show-option -std=c89 -pedantic $(C_and_LD_FLAGS) -ftest-coverage -W -Wall -g -AceUnitData.h: $(ACE_UNIT_PATH)/native/AceUnitData.h - cp $< $@ +LDFLAGS=$(C_and_LD_FLAGS) -AceUnitAnnotations.h: $(ACE_UNIT_PATH)/native/AceUnitAnnotations.h - cp $< $@ +LINTFLAGS=-badflag -nolib -AceUnitLogging.h: $(ACE_UNIT_PATH)/native/AceUnitLogging.h - cp $< $@ +.PHONY : all +all: test -$(LOGGER).c: $(ACE_UNIT_PATH)/native/$(LOGGER).c - cp $< $@ +RunTests: $(OBJECTS) -AceUnit.jar: $(ACE_UNIT_PATH)/java/AceUnit.jar - cp $(ACE_UNIT_PATH)/java/AceUnit.jar $@ - $(ACE_UNIT_PATH)/java/AceUnit.jar: $(ACE_UNIT_JAVA_SRC) ant -f $(ACE_UNIT_PATH)/java/build.xml -compile: runTests +%.d: %.c + $(CPP) -M -MM -MG $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@ -$(FIXTURE_NAME).h: AceUnit.jar $(FIXTURE_NAME).c - java -jar AceUnit.jar $(FIXTURE_NAME) +coverage: test + gcov *.c -runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c +test: RunTests + ./RunTests -test: runTests - ./runTests +.PHONY : clean +clean: + rm -f $(addsuffix .h, $(FIXTURE_NAMES)) RunTests *.gcov *.gcno *.gcda *.o *.d Suite.h -doc: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - doxygen +.PHONY : lint +lint: $(LINTOUTS) -coverage: test - gcov *.c +$(OBJECTS) $(OBJECTS:.o=.d): Makefile + +ifneq ($(MAKECMDGOALS),clean) +-include $(OBJECTS:.o=.d) +endif Added: trunk/src/native/test/basicEmbedded/RunTests.c =================================================================== --- trunk/src/native/test/basicEmbedded/RunTests.c (rev 0) +++ trunk/src/native/test/basicEmbedded/RunTests.c 2008-10-19 12:15:14 UTC (rev 405) @@ -0,0 +1,76 @@ +/* Copyright (c) 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** Test executor for AceUnit unit test "basic". + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @file + */ + +#include <stdbool.h> +#include <stdio.h> + +#include "AceUnitData.h" + +extern const TestFixture_t AceUnitTestFixture; + +/** The number of test cases contained in this fixture. + * This is used to verify that the number of executed test cases is correct. + */ +#define TEST_CASES_FOR_VERIFICATION 12 + +/** The number of test cases that were executed. + * This looks redundant with runnerData->testCaseCount but actually it is not. + * It might be the case that the runner mistakenly executes the wrong methods, e.g. when the generator finds the wrong methods. + */ +extern int myTestCaseCount; + +/** Run the tests. + * @note This is only here temporarily. + * @note Command line arguments currently are ignored. + * In future versions, this part will be auto-generated. + * @param argc Command line argument count. + * @param argv Command line argument values. + * @return Exit status (currently always 0). + */ +int main(void) { + int retVal = 0; + runFixture(&AceUnitTestFixture); + if (runnerData->testCaseFailureCount != 0) { + fprintf(stderr, "Test Cases: %d Errors: %d\n", runnerData->testCaseCount, runnerData->testCaseFailureCount); + retVal = 1; + } + if (runnerData->testCaseCount != TEST_CASES_FOR_VERIFICATION) { + fprintf(stderr, "Test Cases: %d but expected %d\n", runnerData->testCaseCount, TEST_CASES_FOR_VERIFICATION); + retVal = 1; + } + if (myTestCaseCount != TEST_CASES_FOR_VERIFICATION) { + fprintf(stderr, "Test Cases really executed: %d but expected %d\n", myTestCaseCount, TEST_CASES_FOR_VERIFICATION); + retVal = 1; + } + return retVal; +} + Property changes on: trunk/src/native/test/basicEmbedded/RunTests.c ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 11:54:01
|
Revision: 404 http://aceunit.svn.sourceforge.net/aceunit/?rev=404&view=rev Author: christianhujer Date: 2008-10-19 11:53:57 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Completed list of fixed width iso integer types and used protection which at least should work on posix. Modified Paths: -------------- trunk/src/native/AceUnit.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2008-10-19 11:46:22 UTC (rev 403) +++ trunk/src/native/AceUnit.h 2008-10-19 11:53:57 UTC (rev 404) @@ -212,10 +212,21 @@ #include <stddef.h> #include <stdint.h> #elif ACEUNIT_C_MODE == ACEUNIT_C_MODE_C89 +#ifndef __int8_t_defined +#define __int8_t_defined +/** Replacement for stdint.h int8_t in case stdint.h is not available. */ +typedef signed char int8_t; +/** Replacement for stdint.h int16_t in case stdint.h is not available. */ +typedef signed short int int16_t; +/** Replacement for stdint.h int32_t in case stdint.h is not available. */ +typedef signed long int int32_t; +/** Replacement for stdint.h uint8_t in case stdint.h is not available. */ +typedef unsigned char uint8_t; /** Replacement for stdint.h uint16_t in case stdint.h is not available. */ typedef unsigned short int uint16_t; /** Replacement for stdint.h uint32_t in case stdint.h is not available. */ typedef unsigned long int uint32_t; +#endif #ifndef NULL /** Replacement for stddef.h NULL in case stddef.h is not available. */ #if defined(__cplusplus) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 11:46:31
|
Revision: 403 http://aceunit.svn.sourceforge.net/aceunit/?rev=403&view=rev Author: christianhujer Date: 2008-10-19 11:46:22 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Some minor makefile improvements. Modified Paths: -------------- trunk/src/native/test/twoFixtures/Makefile Modified: trunk/src/native/test/twoFixtures/Makefile =================================================================== --- trunk/src/native/test/twoFixtures/Makefile 2008-10-19 11:23:30 UTC (rev 402) +++ trunk/src/native/test/twoFixtures/Makefile 2008-10-19 11:46:22 UTC (rev 403) @@ -19,8 +19,6 @@ LINTOUTS=$(addsuffix .ln,$(PARTS)) -FIXTURE_FILES=$(addsuffix .c,$(FIXTURE_NAMES)) - CPPFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" -I . -I $(ACE_UNIT_PATH)/native C_and_LD_FLAGS=-fprofile-arcs @@ -48,11 +46,11 @@ test: RunTests ./RunTests -#.PHONY : clean +.PHONY : clean clean: rm -f $(addsuffix .h, $(FIXTURE_NAMES)) RunTests *.gcov *.gcno *.gcda *.o *.d Suite.h -#.PHONY : lint +.PHONY : lint lint: $(LINTOUTS) $(OBJECTS) $(OBJECTS:.o=.d): Makefile This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 11:23:40
|
Revision: 402 http://aceunit.svn.sourceforge.net/aceunit/?rev=402&view=rev Author: christianhujer Date: 2008-10-19 11:23:30 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Updated config. Placed the assertion style in the config. Removed obsolete iso types from config. Modified Paths: -------------- trunk/src/native/test/basic/AceUnitConfig.h trunk/src/native/test/basic/AceUnitTest.c trunk/src/native/test/basic/RunTests.c Modified: trunk/src/native/test/basic/AceUnitConfig.h =================================================================== --- trunk/src/native/test/basic/AceUnitConfig.h 2008-10-19 11:19:33 UTC (rev 401) +++ trunk/src/native/test/basic/AceUnitConfig.h 2008-10-19 11:23:30 UTC (rev 402) @@ -1,2 +1,2 @@ -/** Let AceUnit use its own C99 definitions. */ -#define ACEUNIT_INTERNAL_ISO_TYPES +/** Use return to exit a test case with a failed assertion. */ +#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_RETURN Modified: trunk/src/native/test/basic/AceUnitTest.c =================================================================== --- trunk/src/native/test/basic/AceUnitTest.c 2008-10-19 11:19:33 UTC (rev 401) +++ trunk/src/native/test/basic/AceUnitTest.c 2008-10-19 11:23:30 UTC (rev 402) @@ -34,8 +34,6 @@ #include <stdbool.h> #include <stdio.h> -#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_RETURN - #include "AceUnitData.h" #include "AceUnitTest.h" Modified: trunk/src/native/test/basic/RunTests.c =================================================================== --- trunk/src/native/test/basic/RunTests.c 2008-10-19 11:19:33 UTC (rev 401) +++ trunk/src/native/test/basic/RunTests.c 2008-10-19 11:23:30 UTC (rev 402) @@ -33,8 +33,6 @@ #include <stdbool.h> #include <stdio.h> -#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_RETURN - #include "AceUnitData.h" extern const TestFixture_t AceUnitTestFixture; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 11:19:43
|
Revision: 401 http://aceunit.svn.sourceforge.net/aceunit/?rev=401&view=rev Author: christianhujer Date: 2008-10-19 11:19:33 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Improved Makefile. Split unit tests from main. Modified Paths: -------------- trunk/src/native/test/basic/AceUnitTest.c trunk/src/native/test/basic/Makefile Added Paths: ----------- trunk/src/native/test/basic/RunTests.c Modified: trunk/src/native/test/basic/AceUnitTest.c =================================================================== --- trunk/src/native/test/basic/AceUnitTest.c 2008-10-19 10:58:44 UTC (rev 400) +++ trunk/src/native/test/basic/AceUnitTest.c 2008-10-19 11:19:33 UTC (rev 401) @@ -39,16 +39,11 @@ #include "AceUnitData.h" #include "AceUnitTest.h" -/** The number of test cases contained in this fixture. - * This is used to verify that the number of executed test cases is correct. - */ -#define TEST_CASES_FOR_VERIFICATION 12 - /** The number of test cases that were executed. * This looks redundant with runnerData->testCaseCount but actually it is not. * It might be the case that the runner mistakenly executes the wrong methods, e.g. when the generator finds the wrong methods. */ -static int myTestCaseCount = 0; +int myTestCaseCount = 0; /** Clears the current recent error. */ void clearRecentError() { @@ -259,29 +254,3 @@ fail("Expected recentError to be set."); } } - -/** Run the tests. - * @note This is only here temporarily. - * @note Command line arguments currently are ignored. - * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). - */ -int main(int argc, char *argv[]) { - int retVal = 0; - runFixture(&AceUnitTestFixture); - if (runnerData->testCaseFailureCount != 0) { - fprintf(stderr, "Test Cases: %d Errors: %d\n", runnerData->testCaseCount, runnerData->testCaseFailureCount); - retVal = 1; - } - if (runnerData->testCaseCount != TEST_CASES_FOR_VERIFICATION) { - fprintf(stderr, "Test Cases: %d but expected %d\n", runnerData->testCaseCount, TEST_CASES_FOR_VERIFICATION); - retVal = 1; - } - if (myTestCaseCount != TEST_CASES_FOR_VERIFICATION) { - fprintf(stderr, "Test Cases really executed: %d but expected %d\n", myTestCaseCount, TEST_CASES_FOR_VERIFICATION); - retVal = 1; - } - return retVal; -} Modified: trunk/src/native/test/basic/Makefile =================================================================== --- trunk/src/native/test/basic/Makefile 2008-10-19 10:58:44 UTC (rev 400) +++ trunk/src/native/test/basic/Makefile 2008-10-19 11:19:33 UTC (rev 401) @@ -1,62 +1,59 @@ LOGGER=FullPlainLogger - -ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar - -ACE_UNIT_PATH=../../../ - +FIXTURE_NAMES=AceUnitTest +ACE_UNIT_PATH=../../.. ACE_UNIT_JAVA_SRC=$(shell find $(ACE_UNIT_PATH)/java/src -name "*.java") +$(shell java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar .) -FIXTURE_NAME=AceUnitTest +LINT=splint -CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" +PARTS=\ + AceUnit \ + AceUnitData \ + $(LOGGER) \ + $(FIXTURE_NAMES) -all: prepare compile test +VPATH=$(ACE_UNIT_PATH)/native -clean: - rm -f $(ACE_UNIT_FILES) $(FIXTURE_NAME).h runTests *.gcov *.gcno *.gcda +OBJECTS=$(addsuffix .o,$(PARTS)) -prepare: $(ACE_UNIT_FILES) +LINTOUTS=$(addsuffix .ln,$(PARTS)) -AceUnit.c: $(ACE_UNIT_PATH)/native/AceUnit.c - cp $< $@ +CPPFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" -I . -I $(ACE_UNIT_PATH)/native -AceUnit.h: $(ACE_UNIT_PATH)/native/AceUnit.h - cp $< $@ +C_and_LD_FLAGS=-fprofile-arcs -AceUnitData.c: $(ACE_UNIT_PATH)/native/AceUnitData.c - cp $< $@ +CFLAGS=-fdiagnostics-show-option -std=c89 -pedantic $(C_and_LD_FLAGS) -ftest-coverage -W -Wall -g -AceUnitData.h: $(ACE_UNIT_PATH)/native/AceUnitData.h - cp $< $@ +LDFLAGS=$(C_and_LD_FLAGS) -AceUnitAnnotations.h: $(ACE_UNIT_PATH)/native/AceUnitAnnotations.h - cp $< $@ +LINTFLAGS=-badflag -nolib -AceUnitLogging.h: $(ACE_UNIT_PATH)/native/AceUnitLogging.h - cp $< $@ +.PHONY : all +all: test -$(LOGGER).c: $(ACE_UNIT_PATH)/native/$(LOGGER).c - cp $< $@ +RunTests: $(OBJECTS) -AceUnit.jar: $(ACE_UNIT_PATH)/java/AceUnit.jar - cp $(ACE_UNIT_PATH)/java/AceUnit.jar $@ - $(ACE_UNIT_PATH)/java/AceUnit.jar: $(ACE_UNIT_JAVA_SRC) ant -f $(ACE_UNIT_PATH)/java/build.xml -compile: runTests +%.d: %.c + $(CPP) -M -MM -MG $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@ -$(FIXTURE_NAME).h: AceUnit.jar $(FIXTURE_NAME).c - java -jar AceUnit.jar $(FIXTURE_NAME) +coverage: test + gcov *.c -runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c +test: RunTests + ./RunTests -test: runTests - ./runTests +.PHONY : clean +clean: + rm -f $(addsuffix .h, $(FIXTURE_NAMES)) RunTests *.gcov *.gcno *.gcda *.o *.d Suite.h -doc: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - doxygen +.PHONY : lint +lint: $(LINTOUTS) -coverage: test - gcov *.c +$(OBJECTS) $(OBJECTS:.o=.d): Makefile + +ifneq ($(MAKECMDGOALS),clean) +-include $(OBJECTS:.o=.d) +endif Added: trunk/src/native/test/basic/RunTests.c =================================================================== --- trunk/src/native/test/basic/RunTests.c (rev 0) +++ trunk/src/native/test/basic/RunTests.c 2008-10-19 11:19:33 UTC (rev 401) @@ -0,0 +1,77 @@ +/* Copyright (c) 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** Test executor for AceUnit unit test "basic". + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @file + */ + +#include <stdbool.h> +#include <stdio.h> + +#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_RETURN + +#include "AceUnitData.h" + +extern const TestFixture_t AceUnitTestFixture; + +/** The number of test cases contained in this fixture. + * This is used to verify that the number of executed test cases is correct. + */ +#define TEST_CASES_FOR_VERIFICATION 12 + +/** The number of test cases that were executed. + * This looks redundant with runnerData->testCaseCount but actually it is not. + * It might be the case that the runner mistakenly executes the wrong methods, e.g. when the generator finds the wrong methods. + */ +extern int myTestCaseCount; + +/** Run the tests. + * @note This is only here temporarily. + * @note Command line arguments currently are ignored. + * In future versions, this part will be auto-generated. + * @param argc Command line argument count. + * @param argv Command line argument values. + * @return Exit status (currently always 0). + */ +int main(void) { + int retVal = 0; + runFixture(&AceUnitTestFixture); + if (runnerData->testCaseFailureCount != 0) { + fprintf(stderr, "Test Cases: %d Errors: %d\n", runnerData->testCaseCount, runnerData->testCaseFailureCount); + retVal = 1; + } + if (runnerData->testCaseCount != TEST_CASES_FOR_VERIFICATION) { + fprintf(stderr, "Test Cases: %d but expected %d\n", runnerData->testCaseCount, TEST_CASES_FOR_VERIFICATION); + retVal = 1; + } + if (myTestCaseCount != TEST_CASES_FOR_VERIFICATION) { + fprintf(stderr, "Test Cases really executed: %d but expected %d\n", myTestCaseCount, TEST_CASES_FOR_VERIFICATION); + retVal = 1; + } + return retVal; +} Property changes on: trunk/src/native/test/basic/RunTests.c ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 10:58:48
|
Revision: 400 http://aceunit.svn.sourceforge.net/aceunit/?rev=400&view=rev Author: christianhujer Date: 2008-10-19 10:58:44 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Removed redundant macro definition. Fixed some lint issues. Significantly improved the Makefile. Modified Paths: -------------- trunk/src/native/test/twoFixtures/AceUnitConfig.h trunk/src/native/test/twoFixtures/Makefile Added Paths: ----------- trunk/src/native/test/twoFixtures/RunTests.c Removed Paths: ------------- trunk/src/native/test/twoFixtures/RunTest.c Modified: trunk/src/native/test/twoFixtures/AceUnitConfig.h =================================================================== --- trunk/src/native/test/twoFixtures/AceUnitConfig.h 2008-10-19 00:21:45 UTC (rev 399) +++ trunk/src/native/test/twoFixtures/AceUnitConfig.h 2008-10-19 10:58:44 UTC (rev 400) @@ -1,2 +1 @@ -/** Let AceUnit use its own C99 definitions. */ -#define ACEUNIT_INTERNAL_ISO_TYPES +#define ACEUNIT_STATIC_ANNOTATIONS Modified: trunk/src/native/test/twoFixtures/Makefile =================================================================== --- trunk/src/native/test/twoFixtures/Makefile 2008-10-19 00:21:45 UTC (rev 399) +++ trunk/src/native/test/twoFixtures/Makefile 2008-10-19 10:58:44 UTC (rev 400) @@ -1,67 +1,62 @@ LOGGER=FullPlainLogger -#LOGGER=MiniRamLogger - -ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar - -ACE_UNIT_PATH=../../../ - +FIXTURE_NAMES=Fixture1 Fixture2 +ACE_UNIT_PATH=../../.. ACE_UNIT_JAVA_SRC=$(shell find $(ACE_UNIT_PATH)/java/src -name "*.java") +$(shell java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar .) -FIXTURE_NAMES=Fixture1 Fixture2 +LINT=splint -CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" +PARTS=\ + AceUnit \ + AceUnitData \ + RunTests \ + $(LOGGER) \ + $(FIXTURE_NAMES) -FIXTURE_HEADERS=$(addsuffix .h, $(FIXTURE_NAMES)) -FIXTURE_SOURCES=$(addsuffix .c, $(FIXTURE_NAMES)) +VPATH=$(ACE_UNIT_PATH)/native -all: prepare compile test +OBJECTS=$(addsuffix .o,$(PARTS)) -clean: - rm -f $(ACE_UNIT_FILES) $(FIXTURE_HEADERS) runTests *.gcov *.gcno *.gcda +LINTOUTS=$(addsuffix .ln,$(PARTS)) -prepare: $(ACE_UNIT_FILES) +FIXTURE_FILES=$(addsuffix .c,$(FIXTURE_NAMES)) -AceUnit.c: $(ACE_UNIT_PATH)/native/AceUnit.c - cp $< $@ +CPPFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" -I . -I $(ACE_UNIT_PATH)/native -AceUnit.h: $(ACE_UNIT_PATH)/native/AceUnit.h - cp $< $@ +C_and_LD_FLAGS=-fprofile-arcs -AceUnitData.c: $(ACE_UNIT_PATH)/native/AceUnitData.c - cp $< $@ +CFLAGS=-fdiagnostics-show-option -std=c89 -pedantic $(C_and_LD_FLAGS) -ftest-coverage -W -Wall -g -AceUnitData.h: $(ACE_UNIT_PATH)/native/AceUnitData.h - cp $< $@ +LDFLAGS=$(C_and_LD_FLAGS) -AceUnitAnnotations.h: $(ACE_UNIT_PATH)/native/AceUnitAnnotations.h - cp $< $@ +LINTFLAGS=-badflag -nolib -AceUnitLogging.h: $(ACE_UNIT_PATH)/native/AceUnitLogging.h - cp $< $@ +.PHONY : all +all: test -$(LOGGER).c: $(ACE_UNIT_PATH)/native/$(LOGGER).c - cp $< $@ +RunTests: $(OBJECTS) -AceUnit.jar: $(ACE_UNIT_PATH)/java/AceUnit.jar - cp $(ACE_UNIT_PATH)/java/AceUnit.jar $@ - $(ACE_UNIT_PATH)/java/AceUnit.jar: $(ACE_UNIT_JAVA_SRC) ant -f $(ACE_UNIT_PATH)/java/build.xml -compile: runTests +%.d: %.c + $(CPP) -M -MM -MG $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@ -%.h: %.c AceUnit.jar - java -jar AceUnit.jar . +coverage: test + gcov *.c -runTests: $(FIXTURE_SOURCES) $(FIXTURE_HEADERS) $(ACE_UNIT_FILES) - $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c -# $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c +test: RunTests + ./RunTests -test: runTests - ./runTests +#.PHONY : clean +clean: + rm -f $(addsuffix .h, $(FIXTURE_NAMES)) RunTests *.gcov *.gcno *.gcda *.o *.d Suite.h -doc: $(FIXTURE_SOURCES).c $(FIXTURE_HEADERS).h $(ACE_UNIT_FILES) - doxygen +#.PHONY : lint +lint: $(LINTOUTS) -coverage: test - gcov *.c +$(OBJECTS) $(OBJECTS:.o=.d): Makefile + +ifneq ($(MAKECMDGOALS),clean) +-include $(OBJECTS:.o=.d) +endif Deleted: trunk/src/native/test/twoFixtures/RunTest.c =================================================================== --- trunk/src/native/test/twoFixtures/RunTest.c 2008-10-19 00:21:45 UTC (rev 399) +++ trunk/src/native/test/twoFixtures/RunTest.c 2008-10-19 10:58:44 UTC (rev 400) @@ -1,61 +0,0 @@ -/* Copyright (c) 2007, Christian Hujer - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the AceUnit developers nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/** Unit Test for AceUnit. - * Yes, AceUnit can be tested using itself. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - * @file AceUnitTest.c - */ - -#include <stdbool.h> -#include <stdio.h> - -#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_RETURN - -#include "AceUnit.h" -#include "AceUnitData.h" - -extern TestFixture_t Fixture1Fixture; -extern TestFixture_t Fixture2Fixture; - -/** Run the tests. - * @note This is only here temporarily. - * @note Command line arguments currently are ignored. - * In future versions, this part will be auto-generated. - * @param argc Command line argument count. - * @param argv Command line argument values. - * @return Exit status (currently always 0). - */ -int main(int argc, char *argv[]) { - runFixture(&Fixture1Fixture); - runFixture(&Fixture2Fixture); - if (runnerData->testCaseFailureCount != 0) { - fprintf(stderr, "Test Cases: %d Errors: %d\n", runnerData->testCaseCount, runnerData->testCaseFailureCount); - return 1; - } - return 0; -} Copied: trunk/src/native/test/twoFixtures/RunTests.c (from rev 390, trunk/src/native/test/twoFixtures/RunTest.c) =================================================================== --- trunk/src/native/test/twoFixtures/RunTests.c (rev 0) +++ trunk/src/native/test/twoFixtures/RunTests.c 2008-10-19 10:58:44 UTC (rev 400) @@ -0,0 +1,61 @@ +/* Copyright (c) 2007, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** Unit Test for AceUnit. + * Yes, AceUnit can be tested using itself. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @file AceUnitTest.c + */ + +#include <stdbool.h> +#include <stdio.h> + +#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_RETURN + +#include "AceUnit.h" +#include "AceUnitData.h" + +extern TestFixture_t Fixture1Fixture; +extern TestFixture_t Fixture2Fixture; + +/** Run the tests. + * @note This is only here temporarily. + * @note Command line arguments currently are ignored. + * In future versions, this part will be auto-generated. + * @param argc Command line argument count. + * @param argv Command line argument values. + * @return Exit status (currently always 0). + */ +int main(void) { + runFixture(&Fixture1Fixture); + runFixture(&Fixture2Fixture); + if (runnerData->testCaseFailureCount != 0) { + fprintf(stderr, "Test Cases: %d Errors: %d\n", (int) runnerData->testCaseCount, (int) runnerData->testCaseFailureCount); + return 1; + } + return 0; +} Property changes on: trunk/src/native/test/twoFixtures/RunTests.c ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 00:21:55
|
Revision: 399 http://aceunit.svn.sourceforge.net/aceunit/?rev=399&view=rev Author: christianhujer Date: 2008-10-19 00:21:45 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Fixed lint issue. Modified Paths: -------------- trunk/src/native/AceUnit.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2008-10-19 00:08:09 UTC (rev 398) +++ trunk/src/native/AceUnit.h 2008-10-19 00:21:45 UTC (rev 399) @@ -329,7 +329,7 @@ #elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_LONGJMP #ifdef ACEUNIT_SETJMP_INCLUDE #include ACEUNIT_SETJMP_INCLUDE - #elif ACEUNIT_SKIP_SETJMP_INCLUDE + #elif defined(ACEUNIT_SKIP_SETJMP_INCLUDE) #else #include <setjmp.h> #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 00:08:13
|
Revision: 398 http://aceunit.svn.sourceforge.net/aceunit/?rev=398&view=rev Author: christianhujer Date: 2008-10-19 00:08:09 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Improved encapsulation. Modified Paths: -------------- trunk/src/native/ExceptionHandling.c Modified: trunk/src/native/ExceptionHandling.c =================================================================== --- trunk/src/native/ExceptionHandling.c 2008-10-19 00:04:14 UTC (rev 397) +++ trunk/src/native/ExceptionHandling.c 2008-10-19 00:08:09 UTC (rev 398) @@ -31,10 +31,10 @@ * @file ExceptionHandling.c */ -#include <setjmp.h> +#include "ExceptionHandling.h" /** The global exception buffer for single-threaded programs. */ -jmp_buf exceptionBuffer; +static jmp_buf exceptionBuffer; /** The exception buffer of the current thread. * If you work in a multi-threaded environment, make sure the scheduler allocates a jmp_buf for each thread and initializes currentExceptionBuffer for that thread with each conext switch. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-19 00:04:17
|
Revision: 397 http://aceunit.svn.sourceforge.net/aceunit/?rev=397&view=rev Author: christianhujer Date: 2008-10-19 00:04:14 +0000 (Sun, 19 Oct 2008) Log Message: ----------- Added Lint suppression. Modified Paths: -------------- trunk/src/native/ExceptionHandling.c Modified: trunk/src/native/ExceptionHandling.c =================================================================== --- trunk/src/native/ExceptionHandling.c 2008-10-18 23:59:30 UTC (rev 396) +++ trunk/src/native/ExceptionHandling.c 2008-10-19 00:04:14 UTC (rev 397) @@ -45,4 +45,4 @@ * If you work in a single-threaded environment, still make sure that setjmp() is invoked at least once, otherwise your system will get very upset * about uncaught exceptions. */ -jmp_buf *currentExceptionBuffer = &exceptionBuffer; +jmp_buf *currentExceptionBuffer = &exceptionBuffer; //lint !e545 The & is required on platforms where jmp_buf is not an array. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-18 23:59:34
|
Revision: 396 http://aceunit.svn.sourceforge.net/aceunit/?rev=396&view=rev Author: christianhujer Date: 2008-10-18 23:59:30 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Made AceUnitLogging.h self-contained. Modified Paths: -------------- trunk/src/native/AceUnitLogging.h Modified: trunk/src/native/AceUnitLogging.h =================================================================== --- trunk/src/native/AceUnitLogging.h 2008-10-18 23:58:57 UTC (rev 395) +++ trunk/src/native/AceUnitLogging.h 2008-10-18 23:59:30 UTC (rev 396) @@ -29,6 +29,8 @@ /** Include shield to protect the header file from being included more than once. */ #define ACEUNITLOGGING_H 1 +#include "AceUnit.h" + /** AceUnit Logging header file. * You do no tneed to include this header file in a fixture. * Test fixtures do not need this header file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-18 23:59:02
|
Revision: 395 http://aceunit.svn.sourceforge.net/aceunit/?rev=395&view=rev Author: christianhujer Date: 2008-10-18 23:58:57 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Fixed bug in logging interface prototypes. Modified Paths: -------------- trunk/src/native/AceUnitLogging.h Modified: trunk/src/native/AceUnitLogging.h =================================================================== --- trunk/src/native/AceUnitLogging.h 2008-10-18 23:57:36 UTC (rev 394) +++ trunk/src/native/AceUnitLogging.h 2008-10-18 23:58:57 UTC (rev 395) @@ -110,7 +110,7 @@ /** Informs this logger that the runner has started a suite. * Maybe #NULL in case this logger does not implement this function. */ - void(*suiteStarted)(void); + void(*suiteStarted)(SuiteId_t const suiteId); #endif #ifdef ACEUNIT_LOG_FIXTURE @@ -156,7 +156,7 @@ /** Informs this logger that the runner has ended a suite. * Maybe #NULL in case this logger does not implement this function. */ - void(*suiteEnded)(void); + void(*suiteEnded)(SuiteId_t const suiteId); #endif #ifdef ACEUNIT_LOG_RUNNER This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-18 23:57:40
|
Revision: 394 http://aceunit.svn.sourceforge.net/aceunit/?rev=394&view=rev Author: christianhujer Date: 2008-10-18 23:57:36 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Fixed lint issue. Modified Paths: -------------- trunk/src/native/AceUnit.c Modified: trunk/src/native/AceUnit.c =================================================================== --- trunk/src/native/AceUnit.c 2008-10-18 23:57:05 UTC (rev 393) +++ trunk/src/native/AceUnit.c 2008-10-18 23:57:36 UTC (rev 394) @@ -112,7 +112,7 @@ ACEUNIT_PRE_TEST #endif #if ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_LONGJMP - if (!(setjmp(aceunitJmpBuf))) { + if (0 == setjmp(aceunitJmpBuf)) { #endif #ifdef ACEUNIT_LOOP for (currentLoop = 0; (currentLoop < *loopMax) && (NULL == runnerData->recentError); currentLoop++) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-18 23:57:10
|
Revision: 393 http://aceunit.svn.sourceforge.net/aceunit/?rev=393&view=rev Author: christianhujer Date: 2008-10-18 23:57:05 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Improved data integrity of AceUnitData. Modified Paths: -------------- trunk/src/native/AceUnitData.c Modified: trunk/src/native/AceUnitData.c =================================================================== --- trunk/src/native/AceUnitData.c 2008-10-18 17:14:29 UTC (rev 392) +++ trunk/src/native/AceUnitData.c 2008-10-18 23:57:05 UTC (rev 393) @@ -44,7 +44,7 @@ #else /** Test execution information for the Runner and the Assertions. */ -AceUnitRunnerData_t theRunnerData = {0}; +static AceUnitRunnerData_t theRunnerData; /** Pointer to the test execution information for the Runner and the Assertions. */ AceUnitRunnerData_t *runnerData = &theRunnerData; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-18 17:14:32
|
Revision: 392 http://aceunit.svn.sourceforge.net/aceunit/?rev=392&view=rev Author: christianhujer Date: 2008-10-18 17:14:29 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Fixed lint issues in fptr typedefs. Modified Paths: -------------- trunk/src/native/AceUnit.h trunk/src/native/AceUnitLogging.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2008-10-18 17:12:55 UTC (rev 391) +++ trunk/src/native/AceUnit.h 2008-10-18 17:14:29 UTC (rev 392) @@ -495,7 +495,7 @@ * @see #A_AfterClass * @see #A_Ignore */ -typedef void(*testMethod_t)(); +typedef void(*testMethod_t)(void); /** A Suite is a loose collection of test cases. * It consists of other suites and fixtures. Modified: trunk/src/native/AceUnitLogging.h =================================================================== --- trunk/src/native/AceUnitLogging.h 2008-10-18 17:12:55 UTC (rev 391) +++ trunk/src/native/AceUnitLogging.h 2008-10-18 17:14:29 UTC (rev 392) @@ -103,14 +103,14 @@ /** Informs this logger that the runner has started running. * Maybe #NULL in case this logger does not implement this function. */ - void(*runnerStarted)(); + void(*runnerStarted)(void); #endif #ifdef ACEUNIT_LOG_SUITE /** Informs this logger that the runner has started a suite. * Maybe #NULL in case this logger does not implement this function. */ - void(*suiteStarted)(); + void(*suiteStarted)(void); #endif #ifdef ACEUNIT_LOG_FIXTURE @@ -156,14 +156,14 @@ /** Informs this logger that the runner has ended a suite. * Maybe #NULL in case this logger does not implement this function. */ - void(*suiteEnded)(); + void(*suiteEnded)(void); #endif #ifdef ACEUNIT_LOG_RUNNER /** Informs this logger that the runner is about to end. * Maybe #NULL in case this logger does not implement this function. */ - void(*runnerEnded)(); + void(*runnerEnded)(void); #endif } TestLogger_t; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-18 17:13:03
|
Revision: 391 http://aceunit.svn.sourceforge.net/aceunit/?rev=391&view=rev Author: christianhujer Date: 2008-10-18 17:12:55 +0000 (Sat, 18 Oct 2008) Log Message: ----------- Improved C89 / C99 / proprietary environment support. Modified Paths: -------------- trunk/src/native/AceUnit.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2008-10-17 22:20:49 UTC (rev 390) +++ trunk/src/native/AceUnit.h 2008-10-18 17:12:55 UTC (rev 391) @@ -43,21 +43,23 @@ * Some non-vital features are not available in embedded mode. * TODO: describe which features are not available in embedded mode. * </dd> - * <dt><code>ACEUNIT_C99</code></dt> + * <dt><code>ACEUNIT_C_MODE</code></dt> * <dd> - * Define this macro if you use AceUnit and have full C99 (including <code><stdint.h></code>) available. - * AceUnit uses this macro to determine whether to include some standard header files or use its own definitions. - * This includes: - * <ul> - * <li><code><stdint.h></code> for <code>uint16_t</code></li> - * <li><code><stddef.h></code> for <code>NULL</code></li> - * </ul> - * See also <code>ACEUNIT_INTERNAL_ISO_TYPES</code> which tells AceUnit to use its own ISO typedefs. - * Use this if you use the ISO C99 integer types but do not get them from <code><stdint.h></code> but somewhere else. - * <p> + * Set this macro to specify how AceUnit shall interact with the compiler environment regarding header files. + * The following options are possible: + * <dl> + * <dt><code>ACEUNIT_C_MODE_C99_INCLUDES</code> (default in a C99 environment)</dt> + * <dd>This tells AceUnit to include files like <code><stdint.h></code> and <code><stddef.h></code> to define required symbols like <code>uint16_t</code> or <code>NULL</code>.</dd> + * <dt><code>ACEUNIT_C_MODE_C89</code> (default in a C89 environment)</dt> + * <dd>This tells AceUnit that neither C99 include files nor replacement definitions are available, so AceUnit shall use its own definitions.<7dd> + * <dt><code>ACEUNIT_C_MODE_PROPRIETARY</code></dt> + * <dd>This tells AceUnit to assume that the required definitions for symbols like <code>uint16_t</code> or <code>NULL</code> are provided by header files already included by the user before the AceUnit header files.</dd> + * </dl> * If you use non-C99 compilers, you should bug your compiler vendor to produce an ISO/IEC 9899/1999 (aka ISO C99) compiler. - * AceUnit works without problems on C89 compilers. + * As you can correctly guess from this description or have read elsewhere, AceUnit works without problems on C89 compilers. * But it's a shame that even today, about a decade after the release of C99, still only a small minority of compilers actually properly support that standard. + * <p> + * Note: this replaces ACEUNIT_INTERNAL_ISO_TYPES and ACEUNIT_SKIP_ISO_DEFINES from previous versions of AceUnit. * </dd> * <dt><code>ACEUNIT_STATIC_ANNOTATIONS</code></dt> * <dd> @@ -177,12 +179,6 @@ * <code>A_Loop</code> support is independent of the generator. * You may turn <code>A_Loop</code> support on and off during compile time without having to rerun the generator. * </dd> - * <dt><code>ACEUNIT_INTERNAL_ISO_TYPES</code></dt> - * <dd> - * This feature tells AceUnit to use its own ISO defines. - * Use this if you do not have ISO C99 and also do not have your own ISO C99 type definitions. - * Note: this replaces ACEUNIT_SKIP_ISO_DEFINES from previous versions of AceUnit and represents the inverted variant of that switch. - * </dd> * </dl> * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @file AceUnit.h @@ -192,16 +188,34 @@ #include ACEUNIT_CONFIG_FILE #endif -#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && defined(ACEUNIT_C99) +/* Auto-definition of ACEUNIT_C_MODE if it is not defined. */ +#if !defined(ACEUNIT_C_MODE) +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +/* C99 or better environment: Default to using C99. */ +#define ACEUNIT_C_MODE ACEUNIT_C_MODE_C99_INCLUDES +#else +/* <C99: Use its own definitions. */ +#define ACEUNIT_C_MODE ACEUNIT_C_MODE_C89 +#endif +#endif + +/** Value for #ACEUNIT_C_MODE for including C99 standard header files. */ +#define ACEUNIT_C_MODE_C99_INCLUDES 1 + +/** Value for #ACEUNIT_C_MODE for using AceUnit's own replacement definitions. */ +#define ACEUNIT_C_MODE_C89 2 + +/** Value for #ACEUNIT_C_MODE for providing proprietary replacement definitions by the user. */ +#define ACEUNIT_C_MODE_PROPRIETARY 3 + +#if ACEUNIT_C_MODE == ACEUNIT_C_MODE_C99_INCLUDES #include <stddef.h> #include <stdint.h> -#else -#ifdef ACEUNIT_INTERNAL_ISO_TYPES +#elif ACEUNIT_C_MODE == ACEUNIT_C_MODE_C89 /** Replacement for stdint.h uint16_t in case stdint.h is not available. */ typedef unsigned short int uint16_t; /** Replacement for stdint.h uint32_t in case stdint.h is not available. */ typedef unsigned long int uint32_t; -#endif #ifndef NULL /** Replacement for stddef.h NULL in case stddef.h is not available. */ #if defined(__cplusplus) @@ -210,6 +224,10 @@ #define NULL ((void *) 0) #endif #endif +#elif ACEUNIT_C_MODE == ACEUNIT_C_MODE_PROPRIETARY +// no definitions for proprietary mode +#else +#error Unknown value for ACEUNIT_C_MODE #endif #include "AceUnitAnnotations.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-17 22:20:52
|
Revision: 390 http://aceunit.svn.sourceforge.net/aceunit/?rev=390&view=rev Author: christianhujer Date: 2008-10-17 22:20:49 +0000 (Fri, 17 Oct 2008) Log Message: ----------- Removed redundant header file in file list. Modified Paths: -------------- trunk/src/native/test/basic/Makefile trunk/src/native/test/comment/Makefile trunk/src/native/test/loop/Makefile trunk/src/native/test/printf/Makefile Modified: trunk/src/native/test/basic/Makefile =================================================================== --- trunk/src/native/test/basic/Makefile 2008-10-17 22:06:25 UTC (rev 389) +++ trunk/src/native/test/basic/Makefile 2008-10-17 22:20:49 UTC (rev 390) @@ -1,6 +1,6 @@ LOGGER=FullPlainLogger -ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar +ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar ACE_UNIT_PATH=../../../ Modified: trunk/src/native/test/comment/Makefile =================================================================== --- trunk/src/native/test/comment/Makefile 2008-10-17 22:06:25 UTC (rev 389) +++ trunk/src/native/test/comment/Makefile 2008-10-17 22:20:49 UTC (rev 390) @@ -1,6 +1,6 @@ LOGGER=FullPlainLogger -ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar +ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar ACE_UNIT_PATH=../../../ Modified: trunk/src/native/test/loop/Makefile =================================================================== --- trunk/src/native/test/loop/Makefile 2008-10-17 22:06:25 UTC (rev 389) +++ trunk/src/native/test/loop/Makefile 2008-10-17 22:20:49 UTC (rev 390) @@ -1,6 +1,6 @@ LOGGER=FullPlainLogger -ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar +ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar ACE_UNIT_PATH=../../../ Modified: trunk/src/native/test/printf/Makefile =================================================================== --- trunk/src/native/test/printf/Makefile 2008-10-17 22:06:25 UTC (rev 389) +++ trunk/src/native/test/printf/Makefile 2008-10-17 22:20:49 UTC (rev 390) @@ -1,6 +1,6 @@ LOGGER=FullPlainLogger -ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar +ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitData.h AceUnitAnnotations.h AceUnitLogging.h $(LOGGER).c AceUnit.jar ACE_UNIT_PATH=../../../ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-17 22:06:28
|
Revision: 389 http://aceunit.svn.sourceforge.net/aceunit/?rev=389&view=rev Author: christianhujer Date: 2008-10-17 22:06:25 +0000 (Fri, 17 Oct 2008) Log Message: ----------- Added config file to this example. Modified Paths: -------------- trunk/src/native/test/xmlLog/Makefile Added Paths: ----------- trunk/src/native/test/xmlLog/AceUnitConfig.h Added: trunk/src/native/test/xmlLog/AceUnitConfig.h =================================================================== --- trunk/src/native/test/xmlLog/AceUnitConfig.h (rev 0) +++ trunk/src/native/test/xmlLog/AceUnitConfig.h 2008-10-17 22:06:25 UTC (rev 389) @@ -0,0 +1,2 @@ +/** Let AceUnit use its own C99 definitions. */ +#define ACEUNIT_INTERNAL_ISO_TYPES Property changes on: trunk/src/native/test/xmlLog/AceUnitConfig.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/native/test/xmlLog/Makefile =================================================================== --- trunk/src/native/test/xmlLog/Makefile 2008-10-17 22:03:17 UTC (rev 388) +++ trunk/src/native/test/xmlLog/Makefile 2008-10-17 22:06:25 UTC (rev 389) @@ -8,6 +8,8 @@ FIXTURE_NAME=XmlLogTest +CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" + all: prepare compile test clean: @@ -48,8 +50,8 @@ java -jar AceUnit.jar $(FIXTURE_NAME) runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - $(CC) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c -# $(CC) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c + $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c +# $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c test: runTests ./runTests This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-17 22:03:20
|
Revision: 388 http://aceunit.svn.sourceforge.net/aceunit/?rev=388&view=rev Author: christianhujer Date: 2008-10-17 22:03:17 +0000 (Fri, 17 Oct 2008) Log Message: ----------- Added config file to this example. Modified Paths: -------------- trunk/src/native/test/twoFixtures/Makefile Added Paths: ----------- trunk/src/native/test/twoFixtures/AceUnitConfig.h Added: trunk/src/native/test/twoFixtures/AceUnitConfig.h =================================================================== --- trunk/src/native/test/twoFixtures/AceUnitConfig.h (rev 0) +++ trunk/src/native/test/twoFixtures/AceUnitConfig.h 2008-10-17 22:03:17 UTC (rev 388) @@ -0,0 +1,2 @@ +/** Let AceUnit use its own C99 definitions. */ +#define ACEUNIT_INTERNAL_ISO_TYPES Property changes on: trunk/src/native/test/twoFixtures/AceUnitConfig.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/native/test/twoFixtures/Makefile =================================================================== --- trunk/src/native/test/twoFixtures/Makefile 2008-10-15 22:28:16 UTC (rev 387) +++ trunk/src/native/test/twoFixtures/Makefile 2008-10-17 22:03:17 UTC (rev 388) @@ -9,6 +9,8 @@ FIXTURE_NAMES=Fixture1 Fixture2 +CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" + FIXTURE_HEADERS=$(addsuffix .h, $(FIXTURE_NAMES)) FIXTURE_SOURCES=$(addsuffix .c, $(FIXTURE_NAMES)) @@ -52,8 +54,8 @@ java -jar AceUnit.jar . runTests: $(FIXTURE_SOURCES) $(FIXTURE_HEADERS) $(ACE_UNIT_FILES) - $(CC) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c -# $(CC) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c + $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c +# $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c test: runTests ./runTests This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-15 22:28:24
|
Revision: 387 http://aceunit.svn.sourceforge.net/aceunit/?rev=387&view=rev Author: christianhujer Date: 2008-10-15 22:28:16 +0000 (Wed, 15 Oct 2008) Log Message: ----------- Added config file to this example. Modified Paths: -------------- trunk/src/native/test/recursive/Makefile Added Paths: ----------- trunk/src/native/test/recursive/AceUnitConfig.h Added: trunk/src/native/test/recursive/AceUnitConfig.h =================================================================== --- trunk/src/native/test/recursive/AceUnitConfig.h (rev 0) +++ trunk/src/native/test/recursive/AceUnitConfig.h 2008-10-15 22:28:16 UTC (rev 387) @@ -0,0 +1,2 @@ +/** Let AceUnit use its own C99 definitions. */ +#define ACEUNIT_INTERNAL_ISO_TYPES Property changes on: trunk/src/native/test/recursive/AceUnitConfig.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + LF Modified: trunk/src/native/test/recursive/Makefile =================================================================== --- trunk/src/native/test/recursive/Makefile 2008-10-14 08:09:28 UTC (rev 386) +++ trunk/src/native/test/recursive/Makefile 2008-10-15 22:28:16 UTC (rev 387) @@ -9,6 +9,8 @@ FIXTURE_NAME=. +CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" + SOURCES=$(sort $(shell find . -name "*.c") $(filter %.c,$(addprefix ./,$(ACE_UNIT_FILES)))) OBJECTS=$(patsubst %.c,%.o,$(SOURCES)) HEADERS=$(patsubst %.c,%.h,$(shell find . -name "*.c")) @@ -56,7 +58,7 @@ java -jar AceUnit.jar $(FIXTURE_NAME) %.o: %.c - $(CC) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -c -o $@ -I. $< + $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -c -o $@ -I. $< runTests: $(ACE_UNIT_FILES) $(OBJECTS) $(CC) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o $@ $(OBJECTS) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-14 08:09:29
|
Revision: 386 http://aceunit.svn.sourceforge.net/aceunit/?rev=386&view=rev Author: christianhujer Date: 2008-10-14 08:09:28 +0000 (Tue, 14 Oct 2008) Log Message: ----------- Added config file to this example. Modified Paths: -------------- trunk/src/native/test/loop/Makefile Added Paths: ----------- trunk/src/native/test/loop/AceUnitConfig.h Copied: trunk/src/native/test/loop/AceUnitConfig.h (from rev 382, trunk/src/native/test/basic/AceUnitConfig.h) =================================================================== --- trunk/src/native/test/loop/AceUnitConfig.h (rev 0) +++ trunk/src/native/test/loop/AceUnitConfig.h 2008-10-14 08:09:28 UTC (rev 386) @@ -0,0 +1,5 @@ +/** Let AceUnit use its own C99 definitions. */ +#define ACEUNIT_INTERNAL_ISO_TYPES + +/** This test uses the loop feature. */ +#define ACEUNIT_LOOP Property changes on: trunk/src/native/test/loop/AceUnitConfig.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + Added: svn:eol-style + LF Modified: trunk/src/native/test/loop/Makefile =================================================================== --- trunk/src/native/test/loop/Makefile 2008-10-14 08:08:01 UTC (rev 385) +++ trunk/src/native/test/loop/Makefile 2008-10-14 08:09:28 UTC (rev 386) @@ -8,6 +8,8 @@ FIXTURE_NAME=AceUnitLoopTest +CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" + all: prepare compile test clean: @@ -48,7 +50,7 @@ java -jar AceUnit.jar $(FIXTURE_NAME) runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - $(CC) -DACEUNIT_LOOP -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c + $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c test: runTests ./runTests This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-14 08:08:03
|
Revision: 385 http://aceunit.svn.sourceforge.net/aceunit/?rev=385&view=rev Author: christianhujer Date: 2008-10-14 08:08:01 +0000 (Tue, 14 Oct 2008) Log Message: ----------- Added config file to this example. Modified Paths: -------------- trunk/src/native/test/longjmp/Makefile Added Paths: ----------- trunk/src/native/test/longjmp/AceUnitConfig.h Copied: trunk/src/native/test/longjmp/AceUnitConfig.h (from rev 382, trunk/src/native/test/basic/AceUnitConfig.h) =================================================================== --- trunk/src/native/test/longjmp/AceUnitConfig.h (rev 0) +++ trunk/src/native/test/longjmp/AceUnitConfig.h 2008-10-14 08:08:01 UTC (rev 385) @@ -0,0 +1,2 @@ +/** Let AceUnit use its own C99 definitions. */ +#define ACEUNIT_INTERNAL_ISO_TYPES Property changes on: trunk/src/native/test/longjmp/AceUnitConfig.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + Added: svn:eol-style + LF Modified: trunk/src/native/test/longjmp/Makefile =================================================================== --- trunk/src/native/test/longjmp/Makefile 2008-10-14 08:05:08 UTC (rev 384) +++ trunk/src/native/test/longjmp/Makefile 2008-10-14 08:08:01 UTC (rev 385) @@ -9,6 +9,8 @@ FIXTURE_NAME=LongJmpTest +CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" + all: prepare compile test clean: @@ -49,8 +51,8 @@ java -jar AceUnit.jar $(FIXTURE_NAME) runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - $(CC) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c -# $(CC) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c + $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c +# $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c89 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c test: runTests ./runTests This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-10-14 08:05:13
|
Revision: 384 http://aceunit.svn.sourceforge.net/aceunit/?rev=384&view=rev Author: christianhujer Date: 2008-10-14 08:05:08 +0000 (Tue, 14 Oct 2008) Log Message: ----------- Added config file to this example. Modified Paths: -------------- trunk/src/native/test/comment/Makefile Added Paths: ----------- trunk/src/native/test/comment/AceUnitConfig.h Copied: trunk/src/native/test/comment/AceUnitConfig.h (from rev 382, trunk/src/native/test/basic/AceUnitConfig.h) =================================================================== --- trunk/src/native/test/comment/AceUnitConfig.h (rev 0) +++ trunk/src/native/test/comment/AceUnitConfig.h 2008-10-14 08:05:08 UTC (rev 384) @@ -0,0 +1,2 @@ +/** Let AceUnit use its own C99 definitions. */ +#define ACEUNIT_INTERNAL_ISO_TYPES Property changes on: trunk/src/native/test/comment/AceUnitConfig.h ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:mergeinfo + Added: svn:eol-style + LF Modified: trunk/src/native/test/comment/Makefile =================================================================== --- trunk/src/native/test/comment/Makefile 2008-10-14 08:03:29 UTC (rev 383) +++ trunk/src/native/test/comment/Makefile 2008-10-14 08:05:08 UTC (rev 384) @@ -8,6 +8,8 @@ FIXTURE_NAME=CommentTest +CFLAGS=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" + all: prepare compile test clean: @@ -48,7 +50,7 @@ java -jar AceUnit.jar $(FIXTURE_NAME) runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - $(CC) -fdiagnostics-show-option -std=c99 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c + $(CC) $(CFLAGS) -fdiagnostics-show-option -std=c99 -pedantic -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c test: runTests ./runTests This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |