aceunit-commit Mailing List for AceUnit (Page 17)
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...> - 2007-11-12 00:24:27
|
Revision: 183 http://aceunit.svn.sourceforge.net/aceunit/?rev=183&view=rev Author: christianhujer Date: 2007-11-11 16:24:31 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Added test for XML Log. Does not test something yet, just a skeleton. Added Paths: ----------- trunk/src/native/test/xmlLog/ trunk/src/native/test/xmlLog/Makefile trunk/src/native/test/xmlLog/XmlLogTest.c Added: trunk/src/native/test/xmlLog/Makefile =================================================================== --- trunk/src/native/test/xmlLog/Makefile (rev 0) +++ trunk/src/native/test/xmlLog/Makefile 2007-11-12 00:24:31 UTC (rev 183) @@ -0,0 +1,55 @@ +LOGGER=JUnitXmlLogger + +ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitAnnotations.h $(LOGGER).c AceUnit.jar + +ACE_UNIT_PATH=../../../ + +ACE_UNIT_JAVA_SRC=$(shell find $(ACE_UNIT_PATH)/java/src -name "*.java") + +FIXTURE_NAME=XmlLogTest + +all: prepare compile test + +clean: + rm -f $(ACE_UNIT_FILES) $(FIXTURE_NAME).h runTests *.gcov *.gcno *.gcda TESTS-TestSuites.xml + +prepare: $(ACE_UNIT_FILES) + +AceUnit.c: $(ACE_UNIT_PATH)/native/AceUnit.c + cp $< $@ + +AceUnit.h: $(ACE_UNIT_PATH)/native/AceUnit.h + cp $< $@ + +AceUnitData.c: $(ACE_UNIT_PATH)/native/AceUnitData.c + cp $< $@ + +AceUnitAnnotations.h: $(ACE_UNIT_PATH)/native/AceUnitAnnotations.h + cp $< $@ + +$(LOGGER).c: $(ACE_UNIT_PATH)/native/$(LOGGER).c + cp $< $@ + +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 + +$(FIXTURE_NAME).h: AceUnit.jar $(FIXTURE_NAME).c + java -jar AceUnit.jar $(FIXTURE_NAME) >$(FIXTURE_NAME).h + +runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) + $(CC) -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c +# $(CC) -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c + +test: runTests + ./runTests + +doc: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) + doxygen + +coverage: test + gcov *.c Property changes on: trunk/src/native/test/xmlLog/Makefile ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/src/native/test/xmlLog/XmlLogTest.c =================================================================== --- trunk/src/native/test/xmlLog/XmlLogTest.c (rev 0) +++ trunk/src/native/test/xmlLog/XmlLogTest.c 2007-11-12 00:24:31 UTC (rev 183) @@ -0,0 +1,62 @@ +/* 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> + +#include "XmlLogTest.h" + +A_Test void test1() { + fail("Intentional failure for testing the XML Logger."); +} + +/** The Logger. */ +extern TestLogger_t *globalLogger; + +/** 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[]) { + globalLogger->runnerStarted(); + runFixture(&XmlLogTestFixture); + extern uint16_t testCaseCount; + extern uint16_t testCaseFailureCount; + globalLogger->runnerEnded(); + printf("Test Cases: %d Errors: %d\n", testCaseCount, testCaseFailureCount); + return testCaseFailureCount != 0; +} Property changes on: trunk/src/native/test/xmlLog/XmlLogTest.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: 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...> - 2007-11-12 00:17:00
|
Revision: 182 http://aceunit.svn.sourceforge.net/aceunit/?rev=182&view=rev Author: christianhujer Date: 2007-11-11 16:17:02 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Enabled proper logging. Not all methods are used yet, but at least some. Modified Paths: -------------- trunk/src/native/AceUnit.c Modified: trunk/src/native/AceUnit.c =================================================================== --- trunk/src/native/AceUnit.c 2007-11-11 23:59:57 UTC (rev 181) +++ trunk/src/native/AceUnit.c 2007-11-12 00:17:02 UTC (rev 182) @@ -64,13 +64,8 @@ recentError->testId = currentTestId; } -/** Log a single message. - * @todo replace with a list of function pointers to support multiple pluggable loggers. - * @todo make loggers pluggable. - * @todo provide loggers with JUnit 4.x compatible output formats. - * @param recentError Error to log. - */ -extern void FullPlainLoggerLog(const AssertionError_t *const recentError); +/** The Logger. */ +extern TestLogger_t *globalLogger; /** Runs all test cases from a test fixture. * @param fixture Test fixture to run. @@ -79,25 +74,34 @@ #define invokeAll(X) for (secondary = fixture->X; NULL != *secondary; secondary++) {\ (*secondary)();\ } +#define globalLog(X, Y) if ((NULL != globalLogger) && (NULL != globalLogger->X)) {\ + globalLogger->X(Y);\ +} const testMethod_t *secondary; // beforeClass, before, after, afterClass const testMethod_t *testCase; const TestCaseId_t *testId; + globalLog(fixtureStarted, fixture->id); invokeAll(beforeClass); for (testCase = fixture->testCase, testId = fixture->testId; NULL != *testCase; testCase++, testId++) { currentTestId = *testId; + globalLog(testCaseStarted, currentTestId); invokeAll(before); recentError = NULL; (*testCase)(); testCaseCount++; if (NULL != recentError) { - FullPlainLoggerLog(recentError); + globalLog(testCaseFailed, recentError); testCaseFailureCount++; } invokeAll(after); + globalLog(testCaseEnded, currentTestId); + currentTestId = NULL; } invokeAll(afterClass); + globalLog(fixtureEnded, fixture->id); #undef invokeAll +#undef globalLog } /** Runs all test cases from the supplied fixtures. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-11 23:59:54
|
Revision: 181 http://aceunit.svn.sourceforge.net/aceunit/?rev=181&view=rev Author: christianhujer Date: 2007-11-11 15:59:57 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Added id to fixture. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/native/AceUnit.h Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2007-11-11 17:03:28 UTC (rev 180) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2007-11-11 23:59:57 UTC (rev 181) @@ -89,8 +89,12 @@ out.format("%n"); out.format("#ifndef A_FIXTURE_ID%n"); + out.format("#ifdef ACEUNIT_EMBEDED%n"); out.format("#define A_FIXTURE_ID %d%n", id); + out.format("#else%n"); + out.format("#define A_FIXTURE_ID \"%s\"%n", basename); out.format("#endif%n"); + out.format("#endif%n"); out.format("%n"); out.format("#include \"AceUnit.h\"%n"); @@ -118,6 +122,7 @@ final Formatter out = new Formatter(); out.format("/** This fixture. */%n"); out.format("TestFixture_t %sFixture = {%n", basename); + out.format(" A_FIXTURE_ID,%n"); out.format(" testId,%n"); out.format(" testCases,%n"); out.format(" before,%n"); Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2007-11-11 17:03:28 UTC (rev 180) +++ trunk/src/native/AceUnit.h 2007-11-11 23:59:57 UTC (rev 181) @@ -194,6 +194,9 @@ */ typedef struct { + /** The Id of this fixture. */ + FixtureId_t id; + /** The ids of the test cases of this test fixture. */ TestCaseId_t *testId; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-11 17:03:28
|
Revision: 180 http://aceunit.svn.sourceforge.net/aceunit/?rev=180&view=rev Author: christianhujer Date: 2007-11-11 09:03:28 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Moved basic tests to a subdirectory of their own to allow addition of further tests. Added Paths: ----------- trunk/src/native/test/basic/ trunk/src/native/test/basic/AceUnitTest.c trunk/src/native/test/basic/Makefile Removed Paths: ------------- trunk/src/native/test/AceUnitTest.c trunk/src/native/test/Makefile Deleted: trunk/src/native/test/AceUnitTest.c =================================================================== --- trunk/src/native/test/AceUnitTest.c 2007-11-11 15:17:31 UTC (rev 179) +++ trunk/src/native/test/AceUnitTest.c 2007-11-11 17:03:28 UTC (rev 180) @@ -1,235 +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> - -#include "AceUnitTest.h" - -extern AssertionError_t* recentError; - -/** Clears the current recent error. */ -void clearRecentError() { - if (recentError != NULL) { - recentError = NULL; - } -} - -/** Tests that {@link #assertTrue()} with a true condition continues a test case. */ -A_Test void testAssertTrueWithTrueContinues() { - bool assertionContinued = false; - void helper() { - assertTrue("assertTrue(msg, true) MUST continue the test case.", true); - assertionContinued = true; - } - helper(); - clearRecentError(); - if (!assertionContinued) { - fail("Expected assertTrue(msg, true) to continue."); - } -} - -/** Tests that {@link #assertTrue()} with a false condition does not continue a test case. */ -A_Test void testAssertTrueWithFalseReturns() { - bool assertionContinued = false; - void helper() { - assertTrue("Test assertion, expected to fail.", false); - assertionContinued = true; - } - helper(); - clearRecentError(); - if (assertionContinued) { - fail("Expected assertTrue(msg, false) to not continue."); - } -} - -/** Tests that {@link #assertTrue()} with a true condition does not set recentError. */ -A_Test void testAssertTrueWithTrueNoRecentError() { - clearRecentError(); - assertTrue("assertTrue(msg, true) MUST NOT set recentError.", true); - if (recentError != NULL) { - clearRecentError(); - fail("Expected assertTrue(msg, true) to not set recentError."); - } -} - -/** Tests that {@link #assertTrue()} with a false condition sets recentError. */ -A_Test void testAssertTrueWithFalseSetsRecentError() { - bool recentErrorSet = false; - clearRecentError(); - void helper() { - assertTrue("Test assertion, expected to fail.", false); - } - helper(); - if (recentError != NULL) { - recentErrorSet = true; - } - clearRecentError(); - if (!recentErrorSet) { - fail("Expected assertTrue(msg, false) to set recentError."); - } -} - -/** Tests that {@link #assertFalse()} with a true condition continues a test case. */ -A_Test void testAssertFalseWithFalseContinues() { - bool assertionContinued = false; - void helper() { - assertFalse("assertFalse(msg, false) MUST continue the test case.", false); - assertionContinued = true; - } - helper(); - clearRecentError(); - if (!assertionContinued) { - fail("Expected assertion to continue."); - } -} - -/** Tests that {@link #assertFalse()} with a false condition does not continue a test case. */ -A_Test void testAssertFalseWithTrueReturns() { - bool assertionContinued = false; - void helper() { - assertFalse("Test assertion, expected to fail.", true); - assertionContinued = true; - } - helper(); - clearRecentError(); - if (assertionContinued) { - fail("Expected assertion to not continue."); - } -} - -/** Tests that {@link #assertFalse()} with a true condition does not set recentError. */ -A_Test void testAssertFalseWithFalseNoRecentError() { - clearRecentError(); - assertFalse("assertFalse(msg, false) MUST NOT set recentError.", false); - if (recentError != NULL) { - clearRecentError(); - fail("Expected recentError to be NULL."); - } -} - -/** Tests that {@link #assertFalse()} with a false condition sets recentError. */ -A_Test void testAssertFalseWithTrueSetsRecentError() { - bool recentErrorSet = false; - clearRecentError(); - void helper() { - assertFalse("Test assertion, expected to fail.", true); - } - helper(); - if (recentError != NULL) { - recentErrorSet = true; - } - clearRecentError(); - if (!recentErrorSet) { - fail("Expected recentError to be set."); - } -} - -/** Tests that {@link #assertEquals()} with equal values continues a test case. */ -A_Test void testAssertEqualsWithEqualContinues() { - bool assertionContinued = false; - int val1 = 10; - int val2 = val1; - void helper() { - assertEquals("assertEquals(msg, val, val) MUST continue the test case.", val1, val2); - assertionContinued = true; - } - helper(); - clearRecentError(); - if (!assertionContinued) { - fail("Expected assertion to continue."); - } -} - -/** Tests that {@link #assertEquals()} with unequal values does not continue a test case. */ -A_Test void testAssertEqualsWithUnequalReturns() { - bool assertionContinued = false; - int val1 = 10; - int val2 = 20; - void helper() { - assertEquals("assertEquals(msg, val1, val2) MUST NOT continue the test case.", val1, val2); - assertionContinued = true; - } - helper(); - clearRecentError(); - if (assertionContinued) { - fail("Expected assertion to not continue."); - } -} - -/** Tests that {@link #assertEquals()} with equal values does not set recentError. */ -A_Test void testAssertEqualsWithEqualNoRecentError() { - int val1 = 10; - int val2 = val1; - clearRecentError(); - assertEquals("assertEquals(msg, val1, val2) MUST NOT set recentError.", val1, val2); - if (recentError != NULL) { - clearRecentError(); - fail("Expected recentError to be NULL."); - } -} - -/** Tests that {@link #assertEquals()} with unequal values sets recentError. */ -A_Test void testAssertEqualsWithUnequalSetsRecentError() { - bool recentErrorSet = false; - int val1 = 10; - int val2 = 20; - clearRecentError(); - void helper() { - assertEquals("Test assertion, expected to fail.", val1, val2); - } - helper(); - if (recentError != NULL) { - recentErrorSet = true; - } - clearRecentError(); - if (!recentErrorSet) { - 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[]) { - runFixture(&AceUnitTestFixture); - extern uint16_t testCaseCount; - extern uint16_t testCaseFailureCount; - printf("Test Cases: %d Errors: %d\n", testCaseCount, testCaseFailureCount); - return testCaseFailureCount != 0; -} Deleted: trunk/src/native/test/Makefile =================================================================== --- trunk/src/native/test/Makefile 2007-11-11 15:17:31 UTC (rev 179) +++ trunk/src/native/test/Makefile 2007-11-11 17:03:28 UTC (rev 180) @@ -1,56 +0,0 @@ -LOGGER=FullPlainLogger -#LOGGER=MiniRamLogger - -ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitAnnotations.h $(LOGGER).c AceUnit.jar - -ACE_UNIT_PATH=../../ - -ACE_UNIT_JAVA_SRC=$(shell find $(ACE_UNIT_PATH)/java/src -name "*.java") - -FIXTURE_NAME=AceUnitTest - -all: prepare compile test - -clean: - rm -f $(ACE_UNIT_FILES) $(FIXTURE_NAME).h runTests *.gcov *.gcno *.gcda - -prepare: $(ACE_UNIT_FILES) - -AceUnit.c: $(ACE_UNIT_PATH)/native/AceUnit.c - cp $< $@ - -AceUnit.h: $(ACE_UNIT_PATH)/native/AceUnit.h - cp $< $@ - -AceUnitData.c: $(ACE_UNIT_PATH)/native/AceUnitData.c - cp $< $@ - -AceUnitAnnotations.h: $(ACE_UNIT_PATH)/native/AceUnitAnnotations.h - cp $< $@ - -$(LOGGER).c: $(ACE_UNIT_PATH)/native/$(LOGGER).c - cp $< $@ - -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 - -$(FIXTURE_NAME).h: AceUnit.jar $(FIXTURE_NAME).c - java -jar AceUnit.jar $(FIXTURE_NAME) >$(FIXTURE_NAME).h - -runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - $(CC) -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c -# $(CC) -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c - -test: runTests - ./runTests - -doc: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) - doxygen - -coverage: test - gcov *.c Copied: trunk/src/native/test/basic/AceUnitTest.c (from rev 178, trunk/src/native/test/AceUnitTest.c) =================================================================== --- trunk/src/native/test/basic/AceUnitTest.c (rev 0) +++ trunk/src/native/test/basic/AceUnitTest.c 2007-11-11 17:03:28 UTC (rev 180) @@ -0,0 +1,235 @@ +/* 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> + +#include "AceUnitTest.h" + +extern AssertionError_t* recentError; + +/** Clears the current recent error. */ +void clearRecentError() { + if (recentError != NULL) { + recentError = NULL; + } +} + +/** Tests that {@link #assertTrue()} with a true condition continues a test case. */ +A_Test void testAssertTrueWithTrueContinues() { + bool assertionContinued = false; + void helper() { + assertTrue("assertTrue(msg, true) MUST continue the test case.", true); + assertionContinued = true; + } + helper(); + clearRecentError(); + if (!assertionContinued) { + fail("Expected assertTrue(msg, true) to continue."); + } +} + +/** Tests that {@link #assertTrue()} with a false condition does not continue a test case. */ +A_Test void testAssertTrueWithFalseReturns() { + bool assertionContinued = false; + void helper() { + assertTrue("Test assertion, expected to fail.", false); + assertionContinued = true; + } + helper(); + clearRecentError(); + if (assertionContinued) { + fail("Expected assertTrue(msg, false) to not continue."); + } +} + +/** Tests that {@link #assertTrue()} with a true condition does not set recentError. */ +A_Test void testAssertTrueWithTrueNoRecentError() { + clearRecentError(); + assertTrue("assertTrue(msg, true) MUST NOT set recentError.", true); + if (recentError != NULL) { + clearRecentError(); + fail("Expected assertTrue(msg, true) to not set recentError."); + } +} + +/** Tests that {@link #assertTrue()} with a false condition sets recentError. */ +A_Test void testAssertTrueWithFalseSetsRecentError() { + bool recentErrorSet = false; + clearRecentError(); + void helper() { + assertTrue("Test assertion, expected to fail.", false); + } + helper(); + if (recentError != NULL) { + recentErrorSet = true; + } + clearRecentError(); + if (!recentErrorSet) { + fail("Expected assertTrue(msg, false) to set recentError."); + } +} + +/** Tests that {@link #assertFalse()} with a true condition continues a test case. */ +A_Test void testAssertFalseWithFalseContinues() { + bool assertionContinued = false; + void helper() { + assertFalse("assertFalse(msg, false) MUST continue the test case.", false); + assertionContinued = true; + } + helper(); + clearRecentError(); + if (!assertionContinued) { + fail("Expected assertion to continue."); + } +} + +/** Tests that {@link #assertFalse()} with a false condition does not continue a test case. */ +A_Test void testAssertFalseWithTrueReturns() { + bool assertionContinued = false; + void helper() { + assertFalse("Test assertion, expected to fail.", true); + assertionContinued = true; + } + helper(); + clearRecentError(); + if (assertionContinued) { + fail("Expected assertion to not continue."); + } +} + +/** Tests that {@link #assertFalse()} with a true condition does not set recentError. */ +A_Test void testAssertFalseWithFalseNoRecentError() { + clearRecentError(); + assertFalse("assertFalse(msg, false) MUST NOT set recentError.", false); + if (recentError != NULL) { + clearRecentError(); + fail("Expected recentError to be NULL."); + } +} + +/** Tests that {@link #assertFalse()} with a false condition sets recentError. */ +A_Test void testAssertFalseWithTrueSetsRecentError() { + bool recentErrorSet = false; + clearRecentError(); + void helper() { + assertFalse("Test assertion, expected to fail.", true); + } + helper(); + if (recentError != NULL) { + recentErrorSet = true; + } + clearRecentError(); + if (!recentErrorSet) { + fail("Expected recentError to be set."); + } +} + +/** Tests that {@link #assertEquals()} with equal values continues a test case. */ +A_Test void testAssertEqualsWithEqualContinues() { + bool assertionContinued = false; + int val1 = 10; + int val2 = val1; + void helper() { + assertEquals("assertEquals(msg, val, val) MUST continue the test case.", val1, val2); + assertionContinued = true; + } + helper(); + clearRecentError(); + if (!assertionContinued) { + fail("Expected assertion to continue."); + } +} + +/** Tests that {@link #assertEquals()} with unequal values does not continue a test case. */ +A_Test void testAssertEqualsWithUnequalReturns() { + bool assertionContinued = false; + int val1 = 10; + int val2 = 20; + void helper() { + assertEquals("assertEquals(msg, val1, val2) MUST NOT continue the test case.", val1, val2); + assertionContinued = true; + } + helper(); + clearRecentError(); + if (assertionContinued) { + fail("Expected assertion to not continue."); + } +} + +/** Tests that {@link #assertEquals()} with equal values does not set recentError. */ +A_Test void testAssertEqualsWithEqualNoRecentError() { + int val1 = 10; + int val2 = val1; + clearRecentError(); + assertEquals("assertEquals(msg, val1, val2) MUST NOT set recentError.", val1, val2); + if (recentError != NULL) { + clearRecentError(); + fail("Expected recentError to be NULL."); + } +} + +/** Tests that {@link #assertEquals()} with unequal values sets recentError. */ +A_Test void testAssertEqualsWithUnequalSetsRecentError() { + bool recentErrorSet = false; + int val1 = 10; + int val2 = 20; + clearRecentError(); + void helper() { + assertEquals("Test assertion, expected to fail.", val1, val2); + } + helper(); + if (recentError != NULL) { + recentErrorSet = true; + } + clearRecentError(); + if (!recentErrorSet) { + 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[]) { + runFixture(&AceUnitTestFixture); + extern uint16_t testCaseCount; + extern uint16_t testCaseFailureCount; + printf("Test Cases: %d Errors: %d\n", testCaseCount, testCaseFailureCount); + return testCaseFailureCount != 0; +} Copied: trunk/src/native/test/basic/Makefile (from rev 178, trunk/src/native/test/Makefile) =================================================================== --- trunk/src/native/test/basic/Makefile (rev 0) +++ trunk/src/native/test/basic/Makefile 2007-11-11 17:03:28 UTC (rev 180) @@ -0,0 +1,56 @@ +LOGGER=FullPlainLogger +#LOGGER=MiniRamLogger + +ACE_UNIT_FILES=AceUnit.c AceUnit.h AceUnitData.c AceUnitAnnotations.h $(LOGGER).c AceUnit.jar + +ACE_UNIT_PATH=../../../ + +ACE_UNIT_JAVA_SRC=$(shell find $(ACE_UNIT_PATH)/java/src -name "*.java") + +FIXTURE_NAME=AceUnitTest + +all: prepare compile test + +clean: + rm -f $(ACE_UNIT_FILES) $(FIXTURE_NAME).h runTests *.gcov *.gcno *.gcda + +prepare: $(ACE_UNIT_FILES) + +AceUnit.c: $(ACE_UNIT_PATH)/native/AceUnit.c + cp $< $@ + +AceUnit.h: $(ACE_UNIT_PATH)/native/AceUnit.h + cp $< $@ + +AceUnitData.c: $(ACE_UNIT_PATH)/native/AceUnitData.c + cp $< $@ + +AceUnitAnnotations.h: $(ACE_UNIT_PATH)/native/AceUnitAnnotations.h + cp $< $@ + +$(LOGGER).c: $(ACE_UNIT_PATH)/native/$(LOGGER).c + cp $< $@ + +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 + +$(FIXTURE_NAME).h: AceUnit.jar $(FIXTURE_NAME).c + java -jar AceUnit.jar $(FIXTURE_NAME) >$(FIXTURE_NAME).h + +runTests: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) + $(CC) -fprofile-arcs -ftest-coverage -Wall -g -o runTests *.c +# $(CC) -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c + +test: runTests + ./runTests + +doc: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) + doxygen + +coverage: test + gcov *.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-11 15:17:31
|
Revision: 179 http://aceunit.svn.sourceforge.net/aceunit/?rev=179&view=rev Author: christianhujer Date: 2007-11-11 07:17:31 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Added note about updating the tracker. Modified Paths: -------------- release.sh Modified: release.sh =================================================================== --- release.sh 2007-11-10 11:11:07 UTC (rev 178) +++ release.sh 2007-11-11 15:17:31 UTC (rev 179) @@ -23,3 +23,4 @@ echo "The description should include the project description." echo "The normative project description is at: http://sourceforge.net/projects/aceunit/" echo "Don't forget to update the homepage. cd to aceunit/src/doc, change start.xhtml and run ant uploadDoc." +echo "Don't forget to update the bug tracker so users can report bugs to the correct release." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-10 11:11:05
|
Revision: 178 http://aceunit.svn.sourceforge.net/aceunit/?rev=178&view=rev Author: christianhujer Date: 2007-11-10 03:11:07 -0800 (Sat, 10 Nov 2007) Log Message: ----------- Improved TestLogger interface. Made FullPlainLogger and MiniRamLogger implement the TestLogger interface. Modified Paths: -------------- trunk/src/native/AceUnit.h trunk/src/native/FullPlainLogger.c trunk/src/native/JUnitXmlLogger.c trunk/src/native/MiniRamLogger.c Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2007-11-09 20:31:40 UTC (rev 177) +++ trunk/src/native/AceUnit.h 2007-11-10 11:11:07 UTC (rev 178) @@ -244,7 +244,7 @@ * Maybe #NULL in case this logger does not implement this function. * @param fixture Fixture that was started. */ - void(*fixtureStarted)(FixtureId_t fixture); + void(*fixtureStarted)(const FixtureId_t fixture); /** Informs this logger that the runner starts a test case. * Maybe #NULL in case this logger does not implement this function. @@ -254,9 +254,9 @@ /** Informs this logger that the runner failed a test case. * Maybe #NULL in case this logger does not implement this function. - * @param testCase Test case that failed. + * @param error Assertion error with error information. */ - void(*testCaseFailed)(TestCaseId_t testCase, AssertionId_t assertion); + void(*testCaseFailed)(const AssertionError_t *error); /** Informs this logger that the runner ended a test case. * This will be invoked for failed test cases as well as for successful test cases. Modified: trunk/src/native/FullPlainLogger.c =================================================================== --- trunk/src/native/FullPlainLogger.c 2007-11-09 20:31:40 UTC (rev 177) +++ trunk/src/native/FullPlainLogger.c 2007-11-10 11:11:07 UTC (rev 178) @@ -50,3 +50,16 @@ printf("%s:%d: error: in %s: %s\n", recentError->fixtureId, recentError->assertionId.lineNumber, recentError->testId, recentError->assertionId.message); #endif } + +/** This Logger. */ +TestLogger_t FullPlainLogger = { + NULL, + NULL, + NULL, + NULL, + FullPlainLoggerLog, + NULL, + NULL, + NULL, + NULL +}; Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2007-11-09 20:31:40 UTC (rev 177) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-10 11:11:07 UTC (rev 178) @@ -81,7 +81,9 @@ 0, }; -/** @see TestLogger_t#runnerStarted()} */ +/** Initializes all global variables and prepares global log file output. + * @see TestLogger_t#runnerStarted()} + */ static void runnerStarted() { globalFile = fopen(GLOBAL_FILE_NAME, "w"); fprintf(globalFile, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); @@ -91,14 +93,18 @@ globalInfo.suiteId = 0; } -/** @see TestLogger_t#suiteStarted()} */ +/** Initializes suite-specific variables. + * @see TestLogger_t#suiteStarted()} + */ static void suiteStarted() { suiteInfo.errors = 0; suiteInfo.failures = 0; suiteInfo.id = globalInfo.suiteId++; } -/** @see TestLogger_t#fixtureStarted()} */ +/** Initializes fixture-specific variables. + * @see TestLogger_t#fixtureStarted()} + */ static void fixtureStarted(FixtureId_t fixture) { suiteInfo.package = NULL; // TODO suiteInfo.name = NULL; // TODO @@ -107,28 +113,61 @@ } /** @see TestLogger_t#testCaseStarted()} */ -static void testCaseStarted(TestCaseId_t testCase) { +static void testCaseStarted(const TestCaseId_t testCase) { } /** @see TestLogger_t#testCaseFailed()} */ -static void testCaseFailed(TestCaseId_t testCase, AssertionId_t assertion) { +static void testCaseFailed(const AssertionError_t *const assertion) { } /** @see TestLogger_t#testCaseEnded()} */ -static void testCaseEnded(TestCaseId_t testCase) { +static void testCaseEnded(const TestCaseId_t testCase) { } /** @see TestLogger_t#fixtureEnded()} */ static void fixtureEnded() { } +/** Prints the environment as properties XML element to the specified file. + * @param file File to print to + */ +static void printEnvAsProperties(FILE *file) { +#ifdef ACEUNIT_JUNITXMLLOGGER_ENVIRONMENT + extern char **environ; + char **env = environ; + size_t i; + if (NULL == *env) { +#endif + fprintf(globalFile, " <properties/>\n"); +#ifdef ACEUNIT_JUNITXMLLOGGER_ENVIRONMENT + } else { + fprintf(globalFile, " <properties>\n"); + for (; NULL != *env; env++) { + char *ptr = *env; + fprintf(globalFile, " <property name=\""); + for (i = 0; i < strlen(ptr); i++) { + if ('=' == ptr[i]) { + break; + } + } + fwrite(*ptr, sizeof(char), i, globalFile); + ptr += i + 1; + fprintf(globalFile, "\" value=\""); + fwrite(*ptr, sizeof(char), strlen(ptr), globalFile); + fprintf(globalFile, "\" />\n"); + } + fprintf(globalFile, " </properties>\n"); + } +#endif +} + /** @see TestLogger_t#suiteEnded()} */ static void suiteEnded() { int i; FILE *localFile; //<testsuite errors="0" failures="0" hostname="riedquat" id="1" name="BasicCommandTest" package="test.net.sf.japi.io.args" tests="10" time="0.105" timestamp="2007-11-06T20:15:24"> fprintf(globalFile, " <testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" id=\"%d\" name=\"%s\" package=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n"); - fprintf(globalFile, " <properties/>\n"); // TODO: encode environment as properties? + printEnvAsProperties(globalFile); for (i = 0; i < suiteInfo.tests; i++) { //<testcase classname="test.net.sf.japi.io.args.BasicCommandTest" name="testHelp" time="0.0090" /> fprintf(globalFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n"); Modified: trunk/src/native/MiniRamLogger.c =================================================================== --- trunk/src/native/MiniRamLogger.c 2007-11-09 20:31:40 UTC (rev 177) +++ trunk/src/native/MiniRamLogger.c 2007-11-10 11:11:07 UTC (rev 178) @@ -77,3 +77,16 @@ // Now write the data. fwrite(data, sizeof(AssertionError_t), elementCount, file); } + +/** This Logger. */ +TestLogger_t FullPlainLogger = { + NULL, + NULL, + NULL, + NULL, + MiniRamLoggerLog, + NULL, + NULL, + NULL, + NULL +}; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-09 20:31:36
|
Revision: 177 http://aceunit.svn.sourceforge.net/aceunit/?rev=177&view=rev Author: christianhujer Date: 2007-11-09 12:31:40 -0800 (Fri, 09 Nov 2007) Log Message: ----------- Added documentation about message format. Modified Paths: -------------- trunk/src/native/FullPlainLogger.c Modified: trunk/src/native/FullPlainLogger.c =================================================================== --- trunk/src/native/FullPlainLogger.c 2007-11-09 20:28:17 UTC (rev 176) +++ trunk/src/native/FullPlainLogger.c 2007-11-09 20:31:40 UTC (rev 177) @@ -27,6 +27,11 @@ /** Full Logger implementation that logs plain text messages. * The format of the messages is suitable for processing in popular text editors like EMacs or Vim. + * It is the same as that of error messages yielded by most popular compilers like gcc or javac. + * The format is: + * <p><code><var>filename</var>:<var>linenumber</var>: error: in <var>symbolnname</var>: <var>message</var></p> + * For example: + * <p><samp>foo.c:30: error: Expected X to be 15 but was 13.</samp></p> * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @file FullPlainLogger.c */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-09 20:28:13
|
Revision: 176 http://aceunit.svn.sourceforge.net/aceunit/?rev=176&view=rev Author: christianhujer Date: 2007-11-09 12:28:17 -0800 (Fri, 09 Nov 2007) Log Message: ----------- Added README about the test. Added Paths: ----------- trunk/src/native/test/README Added: trunk/src/native/test/README =================================================================== --- trunk/src/native/test/README (rev 0) +++ trunk/src/native/test/README 2007-11-09 20:28:17 UTC (rev 176) @@ -0,0 +1,11 @@ +This is AceUnit Native's own test suite. + +Please note: +It requires a POSIX compatible find command, a normal make command, Java and +Ant to run. +The compiler is required to be GCC or largely compatible with GCC. +It is theoretically possible to port the test to other compilers. +The reasons why the test suite is designed like this are: +* GCC allows nested functions. That's beyond spec, but it makes writing the + AceUnit self test suite so much easier that it justifies using this feature. +* GCC can run with a built in profiling. That's also used by the self test. Property changes on: trunk/src/native/test/README ___________________________________________________________________ Name: svn:mime-type + text/plain Name: 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...> - 2007-11-09 20:22:55
|
Revision: 175 http://aceunit.svn.sourceforge.net/aceunit/?rev=175&view=rev Author: christianhujer Date: 2007-11-09 12:22:59 -0800 (Fri, 09 Nov 2007) Log Message: ----------- Changed Makefile to rebuild AntUnit.jar if necessary to prevent regression. Modified Paths: -------------- trunk/src/native/test/Makefile Modified: trunk/src/native/test/Makefile =================================================================== --- trunk/src/native/test/Makefile 2007-11-09 13:08:45 UTC (rev 174) +++ trunk/src/native/test/Makefile 2007-11-09 20:22:59 UTC (rev 175) @@ -5,6 +5,8 @@ ACE_UNIT_PATH=../../ +ACE_UNIT_JAVA_SRC=$(shell find $(ACE_UNIT_PATH)/java/src -name "*.java") + FIXTURE_NAME=AceUnitTest all: prepare compile test @@ -30,10 +32,10 @@ cp $< $@ AceUnit.jar: $(ACE_UNIT_PATH)/java/AceUnit.jar - cp $< $@ + cp $(ACE_UNIT_PATH)/java/AceUnit.jar $@ -$(ACE_UNIT_PATH)/java/AceUnit.jar: - (cd $(ACE_UNIT_PATH)/java ; ant) +$(ACE_UNIT_PATH)/java/AceUnit.jar: $(ACE_UNIT_JAVA_SRC) + ant -f $(ACE_UNIT_PATH)/java/build.xml compile: runTests This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-06 23:11:27
|
Revision: 173 http://aceunit.svn.sourceforge.net/aceunit/?rev=173&view=rev Author: christianhujer Date: 2007-11-06 15:11:29 -0800 (Tue, 06 Nov 2007) Log Message: ----------- Added TODO. Modified Paths: -------------- trunk/TODO Modified: trunk/TODO =================================================================== --- trunk/TODO 2007-11-06 23:11:23 UTC (rev 172) +++ trunk/TODO 2007-11-06 23:11:29 UTC (rev 173) @@ -9,3 +9,5 @@ * Test GenTest with JUnit * Turn runFixture in a non-void function that returns whether one or more test cases failed. * Create choosable assertion exits: assert() (from assert.h, catch SIGABRT), abort() (from stdlib.h, catch SIGABRT), setjmp()/longjmp() (from setjmp.h), simple return, custom +* Add randomization of test order. +* Add JUnit-compatible loggers. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-06 23:11:19
|
Revision: 172 http://aceunit.svn.sourceforge.net/aceunit/?rev=172&view=rev Author: christianhujer Date: 2007-11-06 15:11:23 -0800 (Tue, 06 Nov 2007) Log Message: ----------- Added comment about C99. Modified Paths: -------------- trunk/README Modified: trunk/README =================================================================== --- trunk/README 2007-11-06 22:53:34 UTC (rev 171) +++ trunk/README 2007-11-06 23:11:23 UTC (rev 172) @@ -19,6 +19,7 @@ ============ Java 1.5 is required for the generator. C89 is required for AceUnit. +If C99 is available, AceUnit can make use of it. DIRECTORY STRUCTURE This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-06 22:53:29
|
Revision: 171 http://aceunit.svn.sourceforge.net/aceunit/?rev=171&view=rev Author: christianhujer Date: 2007-11-06 14:53:34 -0800 (Tue, 06 Nov 2007) Log Message: ----------- Introduced constant GLOBAL_FILE_NAME. Modified Paths: -------------- trunk/src/native/JUnitXmlLogger.c Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2007-11-06 22:51:29 UTC (rev 170) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-06 22:53:34 UTC (rev 171) @@ -50,6 +50,11 @@ return hostname; } +/** The name of the global file. + * Do not change this without really thinking about: It is intentionally the same as that of JUnit / the JUnit Ant task. + */ +#define GLOBAL_FILE_NAME "TESTS-TestSuites.xml" + /** The file TESTS-TestSuites.xml which contains the accumulated log information of all test suites. */ static FILE *globalFile = NULL; @@ -78,7 +83,7 @@ /** @see TestLogger_t#runnerStarted()} */ static void runnerStarted() { - globalFile = fopen("TESTS-TestSuites.xml", "w"); + globalFile = fopen(GLOBAL_FILE_NAME, "w"); fprintf(globalFile, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); fprintf(globalFile, "<testsuites>\n"); fflush(globalFile); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-06 22:51:24
|
Revision: 170 http://aceunit.svn.sourceforge.net/aceunit/?rev=170&view=rev Author: christianhujer Date: 2007-11-06 14:51:29 -0800 (Tue, 06 Nov 2007) Log Message: ----------- Added JUnit compatible XML Logger. This is currently unused and untested, the logging interface is not yet implemented. The commit is there to show some work in progress. Added Paths: ----------- trunk/src/native/JUnitXmlLogger.c Added: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c (rev 0) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-06 22:51:29 UTC (rev 170) @@ -0,0 +1,168 @@ +/* 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. + */ + +/** The JUnitXmlLogger is a {@link TestLogger_t} implementation that writes a test log that is compatible with that of JUnit when using XML log format. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @file JUnitXmlLogger.c + */ + +#include <stdio.h> +#include <stdlib.h> + +#include "AceUnit.h" + +/** Returns the host name of the host this test is executed on. + * @return Host name + */ +static char *getHostname() { + char *hostname; + hostname = getenv("HOSTNAME"); + if (NULL == hostname) { + hostname = getenv("COMPUTERNAME"); + } + if (NULL == hostname) { + hostname = "unknown"; + } + return hostname; +} + +/** The file TESTS-TestSuites.xml which contains the accumulated log information of all test suites. */ +static FILE *globalFile = NULL; + +/** The global information recorded by this logger. */ +static struct { + char *hostname; + int suiteId; +} globalInfo = { + 0 +}; + +/** The information about the current suite. */ +static struct { + int errors; + int failures; + int id; + char *name; + char *package; + char *fullname; + int tests; + float time; + char *timestamp; +} suiteInfo = { + 0, +}; + +/** @see TestLogger_t#runnerStarted()} */ +static void runnerStarted() { + globalFile = fopen("TESTS-TestSuites.xml", "w"); + fprintf(globalFile, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); + fprintf(globalFile, "<testsuites>\n"); + fflush(globalFile); + globalInfo.hostname = getHostname(); + globalInfo.suiteId = 0; +} + +/** @see TestLogger_t#suiteStarted()} */ +static void suiteStarted() { + suiteInfo.errors = 0; + suiteInfo.failures = 0; + suiteInfo.id = globalInfo.suiteId++; +} + +/** @see TestLogger_t#fixtureStarted()} */ +static void fixtureStarted(FixtureId_t fixture) { + suiteInfo.package = NULL; // TODO + suiteInfo.name = NULL; // TODO + suiteInfo.tests = 0; // TODO + suiteInfo.timestamp = NULL; // TODO +} + +/** @see TestLogger_t#testCaseStarted()} */ +static void testCaseStarted(TestCaseId_t testCase) { +} + +/** @see TestLogger_t#testCaseFailed()} */ +static void testCaseFailed(TestCaseId_t testCase, AssertionId_t assertion) { +} + +/** @see TestLogger_t#testCaseEnded()} */ +static void testCaseEnded(TestCaseId_t testCase) { +} + +/** @see TestLogger_t#fixtureEnded()} */ +static void fixtureEnded() { +} + +/** @see TestLogger_t#suiteEnded()} */ +static void suiteEnded() { + int i; + FILE *localFile; + //<testsuite errors="0" failures="0" hostname="riedquat" id="1" name="BasicCommandTest" package="test.net.sf.japi.io.args" tests="10" time="0.105" timestamp="2007-11-06T20:15:24"> + fprintf(globalFile, " <testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" id=\"%d\" name=\"%s\" package=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n"); + fprintf(globalFile, " <properties/>\n"); // TODO: encode environment as properties? + for (i = 0; i < suiteInfo.tests; i++) { + //<testcase classname="test.net.sf.japi.io.args.BasicCommandTest" name="testHelp" time="0.0090" /> + fprintf(globalFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n"); + } + fprintf(globalFile, " <system-out/>\n"); + fprintf(globalFile, " <system-err/>\n"); + fprintf(globalFile, " </testsuite>\n"); + fflush(globalFile); + + localFile = fopen("TEST-test.net.sf.japi.io.args.ArgParserTest.xml", "w"); + //<testsuite errors="0" failures="0" hostname="riedquat" name="test.net.sf.japi.io.args.ArgParserTest" tests="19" time="3.463" timestamp="2007-11-06T20:15:21"> + fprintf(localFile, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n"); + fprintf(localFile, "<testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" name=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n"); + fprintf(localFile, " <properties/>\n"); // TODO: encode environment as properties? + for (i = 0; i < suiteInfo.tests; i++) { + //<testcase classname="test.net.sf.japi.io.args.ArgParserTest" name="testSimpleParseAndRun" time="0.0080" /> + fprintf(localFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n"); + } + fprintf(localFile, " <system-out/>\n"); + fprintf(localFile, " <system-err/>\n"); + fprintf(localFile, "</testsuite>\n"); + fclose(localFile); +} + +/** @see TestLogger_t#runnerEnded()} */ +static void runnerEnded() { + fprintf(globalFile, "</testsuites>\n"); + fclose(globalFile); +} + +/** This Logger. */ +TestLogger_t JUnitXmlLogger = { + runnerStarted, + suiteStarted, + fixtureStarted, + testCaseStarted, + testCaseFailed, + testCaseEnded, + fixtureEnded, + suiteEnded, + runnerEnded +}; Property changes on: trunk/src/native/JUnitXmlLogger.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: 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...> - 2007-11-06 22:49:32
|
Revision: 169 http://aceunit.svn.sourceforge.net/aceunit/?rev=169&view=rev Author: christianhujer Date: 2007-11-06 14:49:36 -0800 (Tue, 06 Nov 2007) Log Message: ----------- Activated suite methods in logger interface. Modified Paths: -------------- trunk/src/native/AceUnit.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2007-11-04 22:44:15 UTC (rev 168) +++ trunk/src/native/AceUnit.h 2007-11-06 22:49:36 UTC (rev 169) @@ -235,10 +235,10 @@ */ void(*runnerStarted)(); -// /** Informs this logger that the runner has started a suite. -// * Maybe #NULL in case this logger does not implement this function. -// */ -// void(*suiteStarted)(); + /** Informs this logger that the runner has started a suite. + * Maybe #NULL in case this logger does not implement this function. + */ + void(*suiteStarted)(); /** Informs this logger that the runner has started a fixture. * Maybe #NULL in case this logger does not implement this function. @@ -250,20 +250,20 @@ * Maybe #NULL in case this logger does not implement this function. * @param testCase Test case that was started. */ - void(*testcaseStarted)(TestCaseId_t testCase); + void(*testCaseStarted)(TestCaseId_t testCase); /** Informs this logger that the runner failed a test case. * Maybe #NULL in case this logger does not implement this function. * @param testCase Test case that failed. */ - void(*testcaseFailed)(TestCaseId_t testCase, AssertionId_t assertion); + void(*testCaseFailed)(TestCaseId_t testCase, AssertionId_t assertion); /** Informs this logger that the runner ended a test case. * This will be invoked for failed test cases as well as for successful test cases. * Maybe #NULL in case this logger does not implement this function. * @param testCase Test case that was ended. */ - void(*testcaseEnded)(TestCaseId_t testCase); + void(*testCaseEnded)(TestCaseId_t testCase); /** Informs this logger that the runner has ended a fixture. * Maybe #NULL in case this logger does not implement this function. @@ -271,10 +271,10 @@ */ void(*fixtureEnded)(FixtureId_t fixture); -// /** Informs this logger that the runner has ended a suite. -// * Maybe #NULL in case this logger does not implement this function. -// */ -// void(*suiteEnded)(); + /** Informs this logger that the runner has ended a suite. + * Maybe #NULL in case this logger does not implement this function. + */ + void(*suiteEnded)(); /** Informs this logger that the runner is about to end. * Maybe #NULL in case this logger does not implement this function. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-04 22:44:12
|
Revision: 168 http://aceunit.svn.sourceforge.net/aceunit/?rev=168&view=rev Author: christianhujer Date: 2007-11-04 14:44:15 -0800 (Sun, 04 Nov 2007) Log Message: ----------- Updated TODO. Modified Paths: -------------- trunk/TODO Modified: trunk/TODO =================================================================== --- trunk/TODO 2007-11-02 21:58:30 UTC (rev 167) +++ trunk/TODO 2007-11-04 22:44:15 UTC (rev 168) @@ -8,3 +8,4 @@ * Test AceUnit with AceUnit * Test GenTest with JUnit * Turn runFixture in a non-void function that returns whether one or more test cases failed. +* Create choosable assertion exits: assert() (from assert.h, catch SIGABRT), abort() (from stdlib.h, catch SIGABRT), setjmp()/longjmp() (from setjmp.h), simple return, custom This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-02 21:58:31
|
Revision: 167 http://aceunit.svn.sourceforge.net/aceunit/?rev=167&view=rev Author: christianhujer Date: 2007-11-02 14:58:30 -0700 (Fri, 02 Nov 2007) Log Message: ----------- Removing unused classes (IntelliJ IDEA obviously forgot). Removed Paths: ------------- trunk/src/java/src/prj/net/sf/aceunit/MethodLists.java trunk/src/java/src/tst/test/net/sf/aceunit/MethodListsTest.java Deleted: trunk/src/java/src/prj/net/sf/aceunit/MethodLists.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/MethodLists.java 2007-11-02 18:50:13 UTC (rev 166) +++ trunk/src/java/src/prj/net/sf/aceunit/MethodLists.java 2007-11-02 21:58:30 UTC (rev 167) @@ -1,157 +0,0 @@ -package net.sf.aceunit; - -import java.util.Arrays; -import java.util.Collection; -import java.util.Formatter; -import java.util.List; -import org.jetbrains.annotations.NotNull; - -/** Handles all test related methods. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public class MethodLists { - - /** The list of {@code @Test} methods. */ - private final MethodList testMethods = new MethodList("A_Test", "testCase", "test cases"); - - /** The list of {@code @Before} methods. */ - private final MethodList beforeMethods = new MethodList("A_Before", "before", "before methods"); - - /** The list of {@code @After} methods. */ - private final MethodList afterMethods = new MethodList("A_After", "after", "after methods"); - - /** The list of {@code @BeforeClass} methods. */ - private final MethodList beforeClassMethods = new MethodList("A_BeforeClass", "beforeClass", "beforeClass methods"); - - /** The list of {@code @AfterClass} methods. */ - private final MethodList afterClassMethods = new MethodList("A_AfterClass", "afterClass", "afterClass methods"); - - /** The list of {@code @Ignore} methods. */ - private final MethodList ignoreMethods = new MethodList("A_Ignore", "ignore", "ignored methods"); - - /** All method lists for easy iteration. */ - private final List<MethodList> methodLists = Arrays.asList(testMethods, beforeMethods, afterMethods, beforeClassMethods, afterClassMethods, ignoreMethods); - - /** All method lists for used methods for easy iteration. */ - private final List<MethodList> usedMethodLists = Arrays.asList(testMethods, beforeMethods, afterMethods, beforeClassMethods, afterClassMethods); - - /** Creates MethodLists. */ - public MethodLists() { - } - - /** Returns an unmodifiable view of all method lists. - * @return All method lists. - */ - public Collection<MethodList> getMethodLists() { - return methodLists; - } - - /** Finds all methods of all method lists in the specified source. - * @param cSource C source to search. - */ - public void findMethods(@NotNull final String cSource) { - for (final MethodList methodList : methodLists) { - methodList.findMethods(cSource); - } - testMethods.removeAll(ignoreMethods); - } - - /** Returns a String representing the C-Source code for the fixture. - * @param basename Base name of the fixture. - * @return String with the C-Source for the fixture. - */ - public String getFixtureCode(@NotNull final String basename) { - final Formatter out = new Formatter(); - out.format("/** AceUnit test header file for fixture %s.%n", basename); - out.format(" *%n"); - out.format(" * You may wonder why this is a header file and yet generates program elements.%n"); - out.format(" * This allows you to declare test methods as static.%n"); - out.format(" *%n"); - out.format(" * @warning This is a generated file. Do not edit. Your changes will be lost.%n"); - out.format(" * @file %s.h%n", basename); - out.format(" */%n"); - out.format("%n"); - - final String ucaseFixture = basename.toUpperCase(); - out.format("#ifndef _%s_H%n", ucaseFixture); - out.format("#define _%s_H%n", ucaseFixture); - out.format("%n"); - - out.format("#ifndef A_FIXTURE_ID%n"); - out.format("#define A_FIXTURE_ID 1%n"); // TODO increment - out.format("#endif%n"); - out.format("%n"); - - out.format("#include \"AceUnit.h\"%n"); - out.format("%n"); - - out.format("%s%n", getPrototypes()); - - out.format("%s%n", getTestMethodIds()); - - for (final MethodList methods : usedMethodLists) { - out.format("%s%n", methods.getFunctionPointerList()); - } - - out.format("%s%n", getFixture(basename)); - - out.format("#endif /* _%s_H */%n", ucaseFixture); - return out.toString(); - } - - /** Returns source code for the fixture. - * @param basename Base name of the fixture. - * @return Source code for the fixture. - */ - public String getFixture(@NotNull final String basename) { - final Formatter out = new Formatter(); - out.format("/** This fixture. */%n"); - out.format("TestFixture_t %sFixture = {%n", basename); - out.format(" testId,%n"); - out.format(" testCase,%n"); - out.format(" before,%n"); - out.format(" after,%n"); - out.format(" beforeClass,%n"); - out.format(" afterClass%n"); - out.format("};%n"); - return out.toString(); - } - - /** Returns source code for all method prototypes. - * @return Source code for all method prototypes. - */ - public String getPrototypes() { - final Formatter out = new Formatter(); - out.format("/* The prototypes are here to be able to include this header file at the beginning of the test file instead of at the end. */%n"); - for (final MethodList methods : usedMethodLists) { - for (final String method : methods) { - out.format("%s void %s();%n", methods.getAnnotation(), method); - } - } - return out.toString(); - } - - /** Returns a String with the source code for the test method ids. - * @return Source code for the test method ids. - */ - public String getTestMethodIds() { - final Formatter out = new Formatter(); - out.format("/** The test case ids of this fixture. */%n"); - out.format("TestCaseId_t testId[] = {%n"); - out.format("#if defined(ACEUNIT_EMBEDDED)%n"); - int methodCount = 0; - final String formatString = String.format(" %%%dd, //%%s%%n", (int) (Math.log10(testMethods.size()) + 1)); - for (final String method : testMethods) { - out.format(formatString, ++methodCount, method); - } - out.format("#else%n"); - for (final String method : testMethods) { - out.format(" \"%s\",%n", method); - } - out.format(" NULL%n"); - out.format("#endif%n"); - out.format("};%n"); - return out.toString(); - } - -} // class MethodLists Deleted: trunk/src/java/src/tst/test/net/sf/aceunit/MethodListsTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/MethodListsTest.java 2007-11-02 18:50:13 UTC (rev 166) +++ trunk/src/java/src/tst/test/net/sf/aceunit/MethodListsTest.java 2007-11-02 21:58:30 UTC (rev 167) @@ -1,13 +0,0 @@ -package test.net.sf.aceunit; - -import org.junit.Test; - -/** Unit Test for {@link net.sf.aceunit.MethodLists}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public class MethodListsTest { - - @Test - public void testDummy() {} - -} // class MethodListsTest This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-02 18:50:13
|
Revision: 166 http://aceunit.svn.sourceforge.net/aceunit/?rev=166&view=rev Author: christianhujer Date: 2007-11-02 11:50:13 -0700 (Fri, 02 Nov 2007) Log Message: ----------- Introduced factory methods for well known annotation types. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/java/src/prj/net/sf/aceunit/MethodList.java trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2007-11-02 17:53:13 UTC (rev 165) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2007-11-02 18:50:13 UTC (rev 166) @@ -12,22 +12,22 @@ public class Fixture { /** The list of {@code @Test} methods. */ - private final MethodList testMethods = new MethodList("A_Test", "testCase", "test cases"); + private final MethodList testMethods = MethodList.createTestMethodList(); /** The list of {@code @Before} methods. */ - private final MethodList beforeMethods = new MethodList("A_Before", "before", "before methods"); + private final MethodList beforeMethods = MethodList.createBeforeMethodList(); /** The list of {@code @After} methods. */ - private final MethodList afterMethods = new MethodList("A_After", "after", "after methods"); + private final MethodList afterMethods = MethodList.createAfterMethodList(); /** The list of {@code @BeforeClass} methods. */ - private final MethodList beforeClassMethods = new MethodList("A_BeforeClass", "beforeClass", "beforeClass methods"); + private final MethodList beforeClassMethods = MethodList.createBeforeClassMethodList(); /** The list of {@code @AfterClass} methods. */ - private final MethodList afterClassMethods = new MethodList("A_AfterClass", "afterClass", "afterClass methods"); + private final MethodList afterClassMethods = MethodList.createAfterClassMethodList(); /** The list of {@code @Ignore} methods. */ - private final MethodList ignoreMethods = new MethodList("A_Ignore", "ignore", "ignored methods"); + private final MethodList ignoreMethods = MethodList.createIgnoreMethodList(); /** All method lists for easy iteration. */ private final List<MethodList> methodLists = Arrays.asList(testMethods, beforeMethods, afterMethods, beforeClassMethods, afterClassMethods, ignoreMethods); Modified: trunk/src/java/src/prj/net/sf/aceunit/MethodList.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/MethodList.java 2007-11-02 17:53:13 UTC (rev 165) +++ trunk/src/java/src/prj/net/sf/aceunit/MethodList.java 2007-11-02 18:50:13 UTC (rev 166) @@ -74,6 +74,48 @@ this.title = title; } + /** Creates a MethodList for A_Test. + * @return MethodList for A_Test + */ + public static MethodList createTestMethodList() { + return new MethodList("A_Test", "testCases", "test cases"); + } + + /** Creates a MethodList for A_Before. + * @return MethodList for A_Before + */ + public static MethodList createBeforeMethodList() { + return new MethodList("A_Before", "before", "before methods"); + } + + /** Creates a MethodList for A_After. + * @return MethodList for A_After + */ + public static MethodList createAfterMethodList() { + return new MethodList("A_After", "after", "after methods"); + } + + /** Creates a MethodList for A_BeforeClass. + * @return MethodList for A_BeforeClass + */ + public static MethodList createBeforeClassMethodList() { + return new MethodList("A_BeforeClass", "beforeClass", "beforeClass methods"); + } + + /** Creates a MethodList for A_AfterClass. + * @return MethodList for A_AfterClass + */ + public static MethodList createAfterClassMethodList() { + return new MethodList("A_AfterClass", "afterClass", "afterClass methods"); + } + + /** Creates a MethodList for A_Ignore. + * @return MethodList for A_Ignore + */ + public static MethodList createIgnoreMethodList() { + return new MethodList("A_Ignore", "ignore", "ignored methods"); + } + /** Returns the annotation this MethodList was created for. * @return The annotation this MethodList was created for. */ Modified: trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java 2007-11-02 17:53:13 UTC (rev 165) +++ trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java 2007-11-02 18:50:13 UTC (rev 166) @@ -42,8 +42,8 @@ /** Tests that the annotation is properly returned. */ @Test public void testGetAnnotation() { - final MethodList methodList1 = new MethodList("A_Test", "testCase", "test cases"); - final MethodList methodList2 = new MethodList("A_Before", "before", "before methods"); + final MethodList methodList1 = MethodList.createTestMethodList(); + final MethodList methodList2 = MethodList.createBeforeMethodList(); Assert.assertEquals("A_Test", methodList1.getAnnotation()); Assert.assertEquals("A_Before", methodList2.getAnnotation()); } @@ -51,7 +51,7 @@ /** Tests that a method list finds a single annotated methods. */ @Test public void testFindSingleAnnotatedMethod() { - final MethodList methodList = new MethodList("A_Test", "testCase", "test cases"); + final MethodList methodList = MethodList.createTestMethodList(); final String cSource = "A_Test void test1() {}"; methodList.findMethods(cSource); Assert.assertTrue(methodList.contains("test1")); @@ -62,7 +62,7 @@ /** Tests that a method list finds multiple annotated methods. */ @Test public void testFindMultipleAnnotatedMethod() { - final MethodList methodList = new MethodList("A_Test", "testCases", "test cases"); + final MethodList methodList = MethodList.createTestMethodList(); final String cSource = "A_Test void test1() {} A_Test void test2() {} A_Test void test3() {}"; methodList.findMethods(cSource); Assert.assertTrue(methodList.contains("test1")); @@ -75,7 +75,7 @@ /** Tests that a method list finds a single annotated methods even if surrounded by other methods. */ @Test public void testFindSingleAnnotatedMethod2() { - final MethodList methodList = new MethodList("A_Test", "testCases", "test cases"); + final MethodList methodList = MethodList.createTestMethodList(); final String cSource = "void dummy1() {} A_Test void test1() {} void dummy2() {}"; methodList.findMethods(cSource); assertContains(methodList, "test1"); @@ -87,7 +87,7 @@ /** Tests that a method list finds multiple annotated methods even if surrounded by other methods. */ @Test public void testFindMultipleAnnotatedMethod2() { - final MethodList methodList = new MethodList("A_Test", "testCases", "test cases"); + final MethodList methodList = MethodList.createTestMethodList(); final String cSource = "void dummy1() {} A_Test void test1() {} void dummy2() {} A_Test void test2() {} void dummy3() {} A_Test void test3() {} void dummy4() {}"; methodList.findMethods(cSource); assertContains(methodList, "test1", "test2", "test3"); @@ -99,8 +99,8 @@ /** Tests that removing a method list from another works. */ @Test public void testRemoveAll() { - final MethodList tests = new MethodList("A_Test", "testCases", "test cases"); - final MethodList ignore = new MethodList("A_Ignore", "ignore", "ignored methods"); + final MethodList tests = MethodList.createTestMethodList(); + final MethodList ignore = MethodList.createIgnoreMethodList(); final String cSource = "void dummy1() {} A_Test void test1() {} void dummy2() {} A_Ignore A_Test void test2() {} void dummy3() {} A_Test A_Ignore void test3() {} void dummy4() {} A_Ignore void ignore1() {}"; tests.findMethods(cSource); ignore.findMethods(cSource); @@ -117,7 +117,7 @@ /** Tests that the returned iterator works correctly. */ @Test public void testIterator() { - final MethodList methodList = new MethodList("A_Test", "testCases", "test cases"); + final MethodList methodList = MethodList.createTestMethodList(); final String cSource = "void dummy1() {} A_Test void test1() {} void dummy2() {} A_Test void test2() {} void dummy3() {} A_Test void test3() {} void dummy4() {}"; methodList.findMethods(cSource); final List<String> foundMethods = new ArrayList<String>(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-02 17:53:09
|
Revision: 165 http://aceunit.svn.sourceforge.net/aceunit/?rev=165&view=rev Author: christianhujer Date: 2007-11-02 10:53:13 -0700 (Fri, 02 Nov 2007) Log Message: ----------- Fixed bug in unit tests. Modified Paths: -------------- trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java Modified: trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java 2007-11-02 17:50:29 UTC (rev 164) +++ trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java 2007-11-02 17:53:13 UTC (rev 165) @@ -42,8 +42,8 @@ /** Tests that the annotation is properly returned. */ @Test public void testGetAnnotation() { - final MethodList methodList1 = new MethodList("A_Test"); - final MethodList methodList2 = new MethodList("A_Before"); + final MethodList methodList1 = new MethodList("A_Test", "testCase", "test cases"); + final MethodList methodList2 = new MethodList("A_Before", "before", "before methods"); Assert.assertEquals("A_Test", methodList1.getAnnotation()); Assert.assertEquals("A_Before", methodList2.getAnnotation()); } @@ -51,7 +51,7 @@ /** Tests that a method list finds a single annotated methods. */ @Test public void testFindSingleAnnotatedMethod() { - final MethodList methodList = new MethodList("A_Test"); + final MethodList methodList = new MethodList("A_Test", "testCase", "test cases"); final String cSource = "A_Test void test1() {}"; methodList.findMethods(cSource); Assert.assertTrue(methodList.contains("test1")); @@ -62,7 +62,7 @@ /** Tests that a method list finds multiple annotated methods. */ @Test public void testFindMultipleAnnotatedMethod() { - final MethodList methodList = new MethodList("A_Test"); + final MethodList methodList = new MethodList("A_Test", "testCases", "test cases"); final String cSource = "A_Test void test1() {} A_Test void test2() {} A_Test void test3() {}"; methodList.findMethods(cSource); Assert.assertTrue(methodList.contains("test1")); @@ -75,7 +75,7 @@ /** Tests that a method list finds a single annotated methods even if surrounded by other methods. */ @Test public void testFindSingleAnnotatedMethod2() { - final MethodList methodList = new MethodList("A_Test"); + final MethodList methodList = new MethodList("A_Test", "testCases", "test cases"); final String cSource = "void dummy1() {} A_Test void test1() {} void dummy2() {}"; methodList.findMethods(cSource); assertContains(methodList, "test1"); @@ -87,7 +87,7 @@ /** Tests that a method list finds multiple annotated methods even if surrounded by other methods. */ @Test public void testFindMultipleAnnotatedMethod2() { - final MethodList methodList = new MethodList("A_Test"); + final MethodList methodList = new MethodList("A_Test", "testCases", "test cases"); final String cSource = "void dummy1() {} A_Test void test1() {} void dummy2() {} A_Test void test2() {} void dummy3() {} A_Test void test3() {} void dummy4() {}"; methodList.findMethods(cSource); assertContains(methodList, "test1", "test2", "test3"); @@ -99,8 +99,8 @@ /** Tests that removing a method list from another works. */ @Test public void testRemoveAll() { - final MethodList tests = new MethodList("A_Test"); - final MethodList ignore = new MethodList("A_Ignore"); + final MethodList tests = new MethodList("A_Test", "testCases", "test cases"); + final MethodList ignore = new MethodList("A_Ignore", "ignore", "ignored methods"); final String cSource = "void dummy1() {} A_Test void test1() {} void dummy2() {} A_Ignore A_Test void test2() {} void dummy3() {} A_Test A_Ignore void test3() {} void dummy4() {} A_Ignore void ignore1() {}"; tests.findMethods(cSource); ignore.findMethods(cSource); @@ -117,7 +117,7 @@ /** Tests that the returned iterator works correctly. */ @Test public void testIterator() { - final MethodList methodList = new MethodList("A_Test"); + final MethodList methodList = new MethodList("A_Test", "testCases", "test cases"); final String cSource = "void dummy1() {} A_Test void test1() {} void dummy2() {} A_Test void test2() {} void dummy3() {} A_Test void test3() {} void dummy4() {}"; methodList.findMethods(cSource); final List<String> foundMethods = new ArrayList<String>(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-02 17:50:27
|
Revision: 164 http://aceunit.svn.sourceforge.net/aceunit/?rev=164&view=rev Author: christianhujer Date: 2007-11-02 10:50:29 -0700 (Fri, 02 Nov 2007) Log Message: ----------- Renamed MethodLists to Fixture. Added support for fixture id. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java Added Paths: ----------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java Copied: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java (from rev 163, trunk/src/java/src/prj/net/sf/aceunit/MethodLists.java) =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java (rev 0) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2007-11-02 17:50:29 UTC (rev 164) @@ -0,0 +1,168 @@ +package net.sf.aceunit; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Formatter; +import java.util.List; +import org.jetbrains.annotations.NotNull; + +/** The Fixture represents a single test fixture along with all its methods. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class Fixture { + + /** The list of {@code @Test} methods. */ + private final MethodList testMethods = new MethodList("A_Test", "testCase", "test cases"); + + /** The list of {@code @Before} methods. */ + private final MethodList beforeMethods = new MethodList("A_Before", "before", "before methods"); + + /** The list of {@code @After} methods. */ + private final MethodList afterMethods = new MethodList("A_After", "after", "after methods"); + + /** The list of {@code @BeforeClass} methods. */ + private final MethodList beforeClassMethods = new MethodList("A_BeforeClass", "beforeClass", "beforeClass methods"); + + /** The list of {@code @AfterClass} methods. */ + private final MethodList afterClassMethods = new MethodList("A_AfterClass", "afterClass", "afterClass methods"); + + /** The list of {@code @Ignore} methods. */ + private final MethodList ignoreMethods = new MethodList("A_Ignore", "ignore", "ignored methods"); + + /** All method lists for easy iteration. */ + private final List<MethodList> methodLists = Arrays.asList(testMethods, beforeMethods, afterMethods, beforeClassMethods, afterClassMethods, ignoreMethods); + + /** All method lists for used methods for easy iteration. */ + private final List<MethodList> usedMethodLists = Arrays.asList(testMethods, beforeMethods, afterMethods, beforeClassMethods, afterClassMethods); + + /** The id of this fixture. */ + private final int id; + + /** Creatse a Fixture with the specified id. + * @param id Id of the fixture + */ + public Fixture(final int id) { + this.id = id; + } + + /** Creates Fixture with a default id of 1. */ + public Fixture() { + this(1); + } + + /** Returns an unmodifiable view of all method lists. + * @return All method lists. + */ + public Collection<MethodList> getMethodLists() { + return methodLists; + } + + /** Finds all methods of all method lists in the specified source. + * @param cSource C source to search. + */ + public void findMethods(@NotNull final String cSource) { + for (final MethodList methodList : methodLists) { + methodList.findMethods(cSource); + } + testMethods.removeAll(ignoreMethods); + } + + /** Returns a String representing the C-Source code for the fixture. + * @param basename Base name of the fixture. + * @return String with the C-Source for the fixture. + */ + public String getFixtureCode(@NotNull final String basename) { + final Formatter out = new Formatter(); + out.format("/** AceUnit test header file for fixture %s.%n", basename); + out.format(" *%n"); + out.format(" * You may wonder why this is a header file and yet generates program elements.%n"); + out.format(" * This allows you to declare test methods as static.%n"); + out.format(" *%n"); + out.format(" * @warning This is a generated file. Do not edit. Your changes will be lost.%n"); + out.format(" * @file %s.h%n", basename); + out.format(" */%n"); + out.format("%n"); + + final String ucaseFixture = basename.toUpperCase(); + out.format("#ifndef _%s_H%n", ucaseFixture); + out.format("#define _%s_H%n", ucaseFixture); + out.format("%n"); + + out.format("#ifndef A_FIXTURE_ID%n"); + out.format("#define A_FIXTURE_ID %d%n", id); + out.format("#endif%n"); + out.format("%n"); + + out.format("#include \"AceUnit.h\"%n"); + out.format("%n"); + + out.format("%s%n", getPrototypes()); + + out.format("%s%n", getTestMethodIds()); + + for (final MethodList methods : usedMethodLists) { + out.format("%s%n", methods.getFunctionPointerList()); + } + + out.format("%s%n", getFixture(basename)); + + out.format("#endif /* _%s_H */%n", ucaseFixture); + return out.toString(); + } + + /** Returns source code for the fixture. + * @param basename Base name of the fixture. + * @return Source code for the fixture. + */ + public String getFixture(@NotNull final String basename) { + final Formatter out = new Formatter(); + out.format("/** This fixture. */%n"); + out.format("TestFixture_t %sFixture = {%n", basename); + out.format(" testId,%n"); + out.format(" testCase,%n"); + out.format(" before,%n"); + out.format(" after,%n"); + out.format(" beforeClass,%n"); + out.format(" afterClass%n"); + out.format("};%n"); + return out.toString(); + } + + /** Returns source code for all method prototypes. + * @return Source code for all method prototypes. + */ + public String getPrototypes() { + final Formatter out = new Formatter(); + out.format("/* The prototypes are here to be able to include this header file at the beginning of the test file instead of at the end. */%n"); + for (final MethodList methods : usedMethodLists) { + for (final String method : methods) { + out.format("%s void %s();%n", methods.getAnnotation(), method); + } + } + return out.toString(); + } + + /** Returns a String with the source code for the test method ids. + * @return Source code for the test method ids. + */ + public String getTestMethodIds() { + final Formatter out = new Formatter(); + out.format("/** The test case ids of this fixture. */%n"); + out.format("TestCaseId_t testId[] = {%n"); + out.format("#if defined(ACEUNIT_EMBEDDED)%n"); + int methodCount = 0; + final String formatString = String.format(" %%%dd, //%%s%%n", (int) (Math.log10(testMethods.size()) + 1)); + for (final String method : testMethods) { + out.format(formatString, ++methodCount, method); + } + out.format("#else%n"); + for (final String method : testMethods) { + out.format(" \"%s\",%n", method); + } + out.format(" NULL%n"); + out.format("#endif%n"); + out.format("};%n"); + return out.toString(); + } + +} // class MethodLists Property changes on: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2007-11-01 21:52:09 UTC (rev 163) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2007-11-02 17:50:29 UTC (rev 164) @@ -44,7 +44,7 @@ public class GenTest<T extends Appendable> extends BasicCommand { /** All method lists for easy iteration. */ - private final MethodLists methodLists = new MethodLists(); + private final Fixture fixture = new Fixture(); /** Output to write to. */ private final T out; @@ -72,8 +72,8 @@ */ private void perform(@NotNull final String basename) throws IOException { final String cSource = readSource(basename + ".c"); - methodLists.findMethods(cSource); - out.append(methodLists.getFixtureCode(basename)); + fixture.findMethods(cSource); + out.append(fixture.getFixtureCode(basename)); } /** Reads a source file. Copied: trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java (from rev 163, trunk/src/java/src/tst/test/net/sf/aceunit/MethodListsTest.java) =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java (rev 0) +++ trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java 2007-11-02 17:50:29 UTC (rev 164) @@ -0,0 +1,13 @@ +package test.net.sf.aceunit; + +import org.junit.Test; + +/** Unit Test for {@link net.sf.aceunit.Fixture}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class FixtureTest { + + @Test + public void testDummy() {} + +} // class MethodListsTest Property changes on: trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: 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...> - 2007-11-01 21:52:21
|
Revision: 163 http://aceunit.svn.sourceforge.net/aceunit/?rev=163&view=rev Author: christianhujer Date: 2007-11-01 14:52:09 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Changed include shield macros to not start with '_'. Modified Paths: -------------- trunk/src/native/AceUnit.h trunk/src/native/AceUnitAnnotations.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2007-11-01 21:46:44 UTC (rev 162) +++ trunk/src/native/AceUnit.h 2007-11-01 21:52:09 UTC (rev 163) @@ -25,8 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _ACEUNIT_H -#define _ACEUNIT_H 1 +#ifndef ACEUNIT_H +#define ACEUNIT_H 1 /** AceUnit header file. * When using AceUnit, this is the header file that you need to include in your test fixtures. @@ -283,4 +283,4 @@ } TestLogger_t; -#endif /* _ACEUNIT_H */ +#endif /* ACEUNIT_H */ Modified: trunk/src/native/AceUnitAnnotations.h =================================================================== --- trunk/src/native/AceUnitAnnotations.h 2007-11-01 21:46:44 UTC (rev 162) +++ trunk/src/native/AceUnitAnnotations.h 2007-11-01 21:52:09 UTC (rev 163) @@ -25,8 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _ACEUNITANNOTATIONS_H -#define _ACEUNITANNOTATIONS_H 1 +#ifndef ACEUNITANNOTATIONS_H +#define ACEUNITANNOTATIONS_H 1 /** AceUnit Annotations header file. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> @@ -69,4 +69,4 @@ */ #define A_IgnoreR(reason) ACEUNIT_ANNOTATION -#endif /* _ACEUNITANNOTATIONS_H */ +#endif /* ACEUNITANNOTATIONS_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-01 21:46:45
|
Revision: 162 http://aceunit.svn.sourceforge.net/aceunit/?rev=162&view=rev Author: christianhujer Date: 2007-11-01 14:46:44 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Added prototype for logger interface. Modified Paths: -------------- trunk/src/native/AceUnit.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2007-11-01 12:46:42 UTC (rev 161) +++ trunk/src/native/AceUnit.h 2007-11-01 21:46:44 UTC (rev 162) @@ -230,16 +230,57 @@ */ typedef struct { - // TODO: method that the runner started running. - // TODO: method that the runner starts a suite. - // TODO: method that the runner starts a fixture. - // TODO: method that the runner starts a testcase. - // TODO: method that the runner failed a testcase. - // TODO: method that the runner ends a testcase. - // TODO: method that the runner ends a fixture. - // TODO: method that the runner ends a suite. - // TODO: method that the runner stopped running. + /** Informs this logger that the runner has started running. + * Maybe #NULL in case this logger does not implement this function. + */ + void(*runnerStarted)(); +// /** Informs this logger that the runner has started a suite. +// * Maybe #NULL in case this logger does not implement this function. +// */ +// void(*suiteStarted)(); + + /** Informs this logger that the runner has started a fixture. + * Maybe #NULL in case this logger does not implement this function. + * @param fixture Fixture that was started. + */ + void(*fixtureStarted)(FixtureId_t fixture); + + /** Informs this logger that the runner starts a test case. + * Maybe #NULL in case this logger does not implement this function. + * @param testCase Test case that was started. + */ + void(*testcaseStarted)(TestCaseId_t testCase); + + /** Informs this logger that the runner failed a test case. + * Maybe #NULL in case this logger does not implement this function. + * @param testCase Test case that failed. + */ + void(*testcaseFailed)(TestCaseId_t testCase, AssertionId_t assertion); + + /** Informs this logger that the runner ended a test case. + * This will be invoked for failed test cases as well as for successful test cases. + * Maybe #NULL in case this logger does not implement this function. + * @param testCase Test case that was ended. + */ + void(*testcaseEnded)(TestCaseId_t testCase); + + /** Informs this logger that the runner has ended a fixture. + * Maybe #NULL in case this logger does not implement this function. + * @param fixture Fixture that was ended. + */ + void(*fixtureEnded)(FixtureId_t fixture); + +// /** Informs this logger that the runner has ended a suite. +// * Maybe #NULL in case this logger does not implement this function. +// */ +// void(*suiteEnded)(); + + /** Informs this logger that the runner is about to end. + * Maybe #NULL in case this logger does not implement this function. + */ + void(*runnerEnded)(); + } TestLogger_t; #endif /* _ACEUNIT_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-01 12:46:38
|
Revision: 161 http://aceunit.svn.sourceforge.net/aceunit/?rev=161&view=rev Author: christianhujer Date: 2007-11-01 05:46:42 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Added link to doxygen documentation. Modified Paths: -------------- trunk/src/doc/start.xhtml Modified: trunk/src/doc/start.xhtml =================================================================== --- trunk/src/doc/start.xhtml 2007-11-01 12:46:03 UTC (rev 160) +++ trunk/src/doc/start.xhtml 2007-11-01 12:46:42 UTC (rev 161) @@ -39,6 +39,7 @@ <h2>AceUnit Documentation</h2> <ul> <li><a href="manual">AceUnit Manual</a></li> + <li><a href="doxygen">AceUnit Doxygen documentation</a></li> <li><a href="future">The Future of AceUnit</a> (planned features etc.)</li> <!--li><a href="news/">AceUnit Project News</a></li--> <!--li><a href="faq">AceUnit FAQ</a> (Frequently Asked Questions)</li--> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-01 12:46:00
|
Revision: 160 http://aceunit.svn.sourceforge.net/aceunit/?rev=160&view=rev Author: christianhujer Date: 2007-11-01 05:46:03 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Updated TODO. Modified Paths: -------------- trunk/TODO Modified: trunk/TODO =================================================================== --- trunk/TODO 2007-11-01 12:44:17 UTC (rev 159) +++ trunk/TODO 2007-11-01 12:46:03 UTC (rev 160) @@ -1,7 +1,7 @@ * Create global build.xml for Building releases -* Include doxygen output in website * Improve website layout (make it similar to that of Japi, Gridarta etc.) * Make it run on Windows, too +* Make better distinction between public API and internal symbols even in header files * Alternatively allow for naming schemes instead of annotations so users can go without the A_Test annotations. * Make internal functions static in C code. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-01 12:44:17
|
Revision: 159 http://aceunit.svn.sourceforge.net/aceunit/?rev=159&view=rev Author: christianhujer Date: 2007-11-01 05:44:17 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Included doxygen in website documentation. Modified Paths: -------------- trunk/src/doc/build.xml Modified: trunk/src/doc/build.xml =================================================================== --- trunk/src/doc/build.xml 2007-11-01 12:36:46 UTC (rev 158) +++ trunk/src/doc/build.xml 2007-11-01 12:44:17 UTC (rev 159) @@ -82,7 +82,18 @@ </copy> </target> - <target name="uploadDoc" depends="transform"> + <target name="doxygen"> + <exec dir="../native" executable="doxygen" failonerror="true"> + </exec> + <copy + todir="docs/doxygen" + > + <fileset dir="../native/doc/html" /> + </copy> + <echo file="docs/doxygen/.htaccess">DirectoryIndex index.html</echo> + </target> + + <target name="uploadDoc" depends="transform, doxygen"> <exec executable="rsync" failonerror="true"> <arg line="-auzv -e ssh docs/ ${user.rsync.username}@${user.rsync.host}:${user.rsync.dir}/htdocs/" /> </exec> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-01 12:36:42
|
Revision: 158 http://aceunit.svn.sourceforge.net/aceunit/?rev=158&view=rev Author: christianhujer Date: 2007-11-01 05:36:46 -0700 (Thu, 01 Nov 2007) Log Message: ----------- Removed TODOs that are already done. Modified Paths: -------------- trunk/src/native/AceUnit.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2007-11-01 12:36:33 UTC (rev 157) +++ trunk/src/native/AceUnit.h 2007-11-01 12:36:46 UTC (rev 158) @@ -123,8 +123,6 @@ * @param message Message to create. */ #ifdef ACEUNIT_EMBEDDED -// TODO: Define A_FIXTURE_ID -// TODO: Define A_ASSERTION_ID #define newAssertionError(message) recordError(A_FIXTURE_ID, (AssertionId_t) {__LINE__}); return #else #define newAssertionError(message) recordError(__FILE__, (AssertionId_t) {__LINE__, message}); return This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |