aceunit-commit Mailing List for AceUnit (Page 16)
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-18 13:33:32
|
Revision: 208 http://aceunit.svn.sourceforge.net/aceunit/?rev=208&view=rev Author: christianhujer Date: 2007-11-18 05:33:33 -0800 (Sun, 18 Nov 2007) Log Message: ----------- Removed A_IgnoreR annotation as it is currently unsupported and has low priority. 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-18 13:18:14 UTC (rev 207) +++ trunk/src/native/AceUnit.h 2007-11-18 13:33:33 UTC (rev 208) @@ -55,7 +55,7 @@ * </dd> * <dt><code>ACEUNIT_STATIC_ANNOTATIONS</code></dt> * <dd> - * Define this macro to make AceUnit annotations (#A_Test, #A_Before, #A_After, #A_BeforeClass, #A_AfterClass, #A_Ignore, #A_IgnoreR) behave like the <code>static</code> keyword. + * Define this macro to make AceUnit annotations (#A_Test, #A_Before, #A_After, #A_BeforeClass, #A_AfterClass, #A_Ignore) behave like the <code>static</code> keyword. * That way you have easy and flexible control whether or not test methods are static. * <p> * Declaring test methods as static has a significant advantage. Modified: trunk/src/native/AceUnitAnnotations.h =================================================================== --- trunk/src/native/AceUnitAnnotations.h 2007-11-18 13:18:14 UTC (rev 207) +++ trunk/src/native/AceUnitAnnotations.h 2007-11-18 13:33:33 UTC (rev 208) @@ -64,10 +64,4 @@ */ #define A_Ignore ACEUNIT_ANNOTATION -/** Ignore annotation, use for test cases to ignore. - * This annotation is only allowed for methods annotated as {@link #A_Test}. - * @param reason Description of the reason why this test case is currently ignored. - */ -#define A_IgnoreR(reason) ACEUNIT_ANNOTATION - #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-18 13:18:10
|
Revision: 207 http://aceunit.svn.sourceforge.net/aceunit/?rev=207&view=rev Author: christianhujer Date: 2007-11-18 05:18:14 -0800 (Sun, 18 Nov 2007) Log Message: ----------- Added TODO for fixed filename. Modified Paths: -------------- trunk/src/native/JUnitXmlLogger.c Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2007-11-18 13:17:47 UTC (rev 206) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-18 13:18:14 UTC (rev 207) @@ -177,7 +177,7 @@ fprintf(globalFile, " </testsuite>\n"); fflush(globalFile); - localFile = fopen("TEST-test.net.sf.japi.io.args.ArgParserTest.xml", "w"); + localFile = fopen("TEST-test.net.sf.japi.io.args.ArgParserTest.xml", "w"); // TODO: configure filename //<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", 0/*TODO*/, 0/*TODO*/, globalInfo.hostname, NULL/*TODO*/, 0/*TODO*/, 0.0/*TODO*/, NULL/*TODO*/); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-18 13:17:43
|
Revision: 206 http://aceunit.svn.sourceforge.net/aceunit/?rev=206&view=rev Author: christianhujer Date: 2007-11-18 05:17:47 -0800 (Sun, 18 Nov 2007) Log Message: ----------- Fixed bug: missing comma. Modified Paths: -------------- trunk/src/native/JUnitXmlLogger.c Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2007-11-18 13:13:29 UTC (rev 205) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-18 13:17:47 UTC (rev 206) @@ -200,7 +200,7 @@ /** This Logger. */ AceUnitNewLogger( - JUnitXmlLogger + JUnitXmlLogger, runnerStarted, suiteStarted, fixtureStarted, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-18 13:13:39
|
Revision: 205 http://aceunit.svn.sourceforge.net/aceunit/?rev=205&view=rev Author: christianhujer Date: 2007-11-18 05:13:29 -0800 (Sun, 18 Nov 2007) Log Message: ----------- Split declaration of ACEUNIT_ABORT from its related information to fix doxygen warning. Modified Paths: -------------- trunk/src/native/AceUnit.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2007-11-18 13:07:28 UTC (rev 204) +++ trunk/src/native/AceUnit.h 2007-11-18 13:13:29 UTC (rev 205) @@ -185,23 +185,36 @@ #endif #endif +/* Abort style specific configuration. */ +#if ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_RETURN + // nothing special +#elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_ASSERT + #include <assert.h> +#elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_ABORT + #include <stdlib.h> +#elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_LONGJMP + #include <setjmp.h> + /** Jump Buffer for AceUnit to abort a test case and jump back to the runner. */ + extern jmp_buf aceunitJmpBuf; +#elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_CUSTOM + // nothing special +#else + #error Unknown value for ACEUNIT_ASSERTION_STYLE. +#endif + /** Code for aborting a test case in case of an assertion. */ #if ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_RETURN -#define ACEUNIT_ABORT return + #define ACEUNIT_ABORT return #elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_ASSERT -#include <assert.h> -#define ACEUNIT_ABORT assert(false) + #define ACEUNIT_ABORT assert(false) #elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_ABORT -#include <stdlib.h> -#define ACEUNIT_ABORT abort() + #define ACEUNIT_ABORT abort() #elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_LONGJMP -#include <setjmp.h> -extern jmp_buf aceunitJmpBuf; -#define ACEUNIT_ABORT longjmp(aceunitJmpBuf, 1) + #define ACEUNIT_ABORT longjmp(aceunitJmpBuf, 1) #elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_CUSTOM -#define ACEUNIT_ABORT ACEUNIT_CUSTOM_ASSERT + #define ACEUNIT_ABORT ACEUNIT_CUSTOM_ASSERT #else -#error Unknown value for ACEUNIT_ASSERTION_STYLE + #error Unexpected internal error. #endif /** FixtureId_t specifies a test fixture. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-18 13:08:38
|
Revision: 204 http://aceunit.svn.sourceforge.net/aceunit/?rev=204&view=rev Author: christianhujer Date: 2007-11-18 05:07:28 -0800 (Sun, 18 Nov 2007) Log Message: ----------- Added doxygen comment to include shields. 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-18 13:05:41 UTC (rev 203) +++ trunk/src/native/AceUnit.h 2007-11-18 13:07:28 UTC (rev 204) @@ -26,6 +26,7 @@ */ #ifndef ACEUNIT_H +/** Include shield to protect the header file from being included more than once. */ #define ACEUNIT_H 1 /** AceUnit header file. Modified: trunk/src/native/AceUnitAnnotations.h =================================================================== --- trunk/src/native/AceUnitAnnotations.h 2007-11-18 13:05:41 UTC (rev 203) +++ trunk/src/native/AceUnitAnnotations.h 2007-11-18 13:07:28 UTC (rev 204) @@ -26,6 +26,7 @@ */ #ifndef ACEUNITANNOTATIONS_H +/** Include shield to protect the header file from being included more than once. */ #define ACEUNITANNOTATIONS_H 1 /** AceUnit Annotations header file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-18 13:05:39
|
Revision: 203 http://aceunit.svn.sourceforge.net/aceunit/?rev=203&view=rev Author: christianhujer Date: 2007-11-18 05:05:41 -0800 (Sun, 18 Nov 2007) Log Message: ----------- Added macro for declaring loggers. The purpose is to tweak loggers via conditional compilation. 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-18 12:59:40 UTC (rev 202) +++ trunk/src/native/AceUnit.h 2007-11-18 13:05:41 UTC (rev 203) @@ -356,6 +356,12 @@ extern void runFixture(const TestFixture_t *const fixture); /** A Logger logs events during test execution. + * + * @warning When you write a logger, you should not use this structure directly. + * If you violate this rule, your logger will be much more dependant on changes to the structure than it should. + * Instead, use the macro #declareLogger() to declare an instance of this type. + * + * @see #AceUnitNewLogger() * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ typedef struct { @@ -413,4 +419,30 @@ } TestLogger_t; +/** Declare a logger. + * Use this macro for declaring instance of #TestLogger_t. + * Depending on the configuration / environment, this macro may or may not use all of its parameters. + * @param name Name of the logger to declare, will create a variable with this name and of type #TestLogger_t. + * @param runnerStarted Delegates to #TestLogger_t.runnerStarted. + * @param suiteStarted Delegates to #TestLogger_t.suiteStarted. + * @param fixtureStarted Delegates to #TestLogger_t.fixtureStarted. + * @param testCaseStarted Delegates to #TestLogger_t.testCaseStarted. + * @param testCaseFailed Delegates to #TestLogger_t.testCaseFailed. + * @param testCaseEnded Delegates to #TestLogger_t.testCaseEnded. + * @param fixtureEnded Delegates to #TestLogger_t.fixtureEnded. + * @param suiteEnded Delegates to #TestLogger_t.suiteEnded. + * @param runnerEnded Delegates to #TestLogger_t.runnerEnded. + */ +#define AceUnitNewLogger(name, runnerStarted, suiteStarted, fixtureStarted, testCaseStarted, testCaseFailed, testCaseEnded, fixtureEnded, suiteEnded, runnerEnded) TestLogger_t name = {\ + runnerStarted,\ + suiteStarted,\ + fixtureStarted,\ + testCaseStarted,\ + testCaseFailed,\ + testCaseEnded,\ + fixtureEnded,\ + suiteEnded,\ + runnerEnded\ +} + #endif /* ACEUNIT_H */ Modified: trunk/src/native/FullPlainLogger.c =================================================================== --- trunk/src/native/FullPlainLogger.c 2007-11-18 12:59:40 UTC (rev 202) +++ trunk/src/native/FullPlainLogger.c 2007-11-18 13:05:41 UTC (rev 203) @@ -52,7 +52,8 @@ } /** This Logger. */ -TestLogger_t FullPlainLogger = { +AceUnitNewLogger( + FullPlainLogger, NULL, NULL, NULL, @@ -62,6 +63,6 @@ NULL, NULL, NULL -}; +); TestLogger_t *globalLogger = &FullPlainLogger; // XXX Hack. Remove. Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2007-11-18 12:59:40 UTC (rev 202) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-18 13:05:41 UTC (rev 203) @@ -199,7 +199,8 @@ } /** This Logger. */ -TestLogger_t JUnitXmlLogger = { +AceUnitNewLogger( + JUnitXmlLogger runnerStarted, suiteStarted, fixtureStarted, @@ -209,6 +210,6 @@ fixtureEnded, suiteEnded, runnerEnded -}; +); TestLogger_t *globalLogger = &JUnitXmlLogger; // XXX Hack. Remove. Modified: trunk/src/native/MiniRamLogger.c =================================================================== --- trunk/src/native/MiniRamLogger.c 2007-11-18 12:59:40 UTC (rev 202) +++ trunk/src/native/MiniRamLogger.c 2007-11-18 13:05:41 UTC (rev 203) @@ -79,7 +79,7 @@ } /** This Logger. */ -TestLogger_t MiniRamLogger = { +AceUnitNewLogger(MiniRamLogger, NULL, NULL, NULL, @@ -89,6 +89,6 @@ NULL, NULL, NULL -}; +); TestLogger_t *globalLogger = &MiniRamLogger; // XXX Hack. Remove. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-18 12:59:35
|
Revision: 202 http://aceunit.svn.sourceforge.net/aceunit/?rev=202&view=rev Author: christianhujer Date: 2007-11-18 04:59:40 -0800 (Sun, 18 Nov 2007) Log Message: ----------- Improved documentation. Modified Paths: -------------- trunk/src/native/AceUnit.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2007-11-17 21:33:09 UTC (rev 201) +++ trunk/src/native/AceUnit.h 2007-11-18 12:59:40 UTC (rev 202) @@ -36,6 +36,9 @@ * <dd> * Define this macro if you want to use AceUnit in embedded mode. * Using AceUnit in embedded mode will use test element ids that are <code>uint16_t</code> instead of <code>char*</code>. + * Memory consumption in embedded mode is significantly reduced. + * Some non-vital features are not available in embedded mode. + * TODO: describe which features are not available in embedded mode. * </dd> * <dt><code>ACEUNIT_C99</code></dt> * <dd> @@ -46,12 +49,31 @@ * <li><code><stdint.h></code> for <code>uint16_t</code></li> * <li><code><stddef.h></code> for <code>NULL</code></li> * </ul> + * If you use non-C99 compilers, you should bug your compiler vendor to produce an ISO/IEC 9899/1999 (aka ISO C99) compiler. + * It's a shame that today, about a decade after the release of C99, still only a small minority of compilers actually proparly support that standard. * </dd> * <dt><code>ACEUNIT_STATIC_ANNOTATIONS</code></dt> * <dd> - * Define this macro if you want AceUnit annotations (#A_Test, #A_Before, #A_After, #A_BeforeClass, #A_AfterClass, #A_Ignore, #A_IgnoreR) to behave like the <code>static</code> keyword. - * The advantage of having <code>static</code> annotations is that you will be safe from naming conflicts amongst your test cases. - * The disadvantage is that depending on your tool chain, your linker might not generate all desired debugging information for <code>static</code> functions. + * Define this macro to make AceUnit annotations (#A_Test, #A_Before, #A_After, #A_BeforeClass, #A_AfterClass, #A_Ignore, #A_IgnoreR) behave like the <code>static</code> keyword. + * That way you have easy and flexible control whether or not test methods are static. + * <p> + * Declaring test methods as static has a significant advantage. + * You will be able to use the same name in different fixtures and still build and run them all together. + * For logging, it is not required that test methods have unique names. + * Logging will always also include the associated fixture (e.g. filename + line number). + * So you will always uniquely identify which test case filed, even if the names of the test cases are not unique. + * <p> + * However, there are debuggers which will cause head ache if you try to debug functions which are static. + * Some tool chains (compilers / linkers) will not emit proper debug information for functions which are static. + * <p> + * The pros and cons for static test methods are both very significant. + * Whether or not you want to use static depends on your environment. + * Because of that, we've left the choice to you. + * <p> + * But we've prepared everything for you. + * Toggling between these two options is as simple as (not) defining this macro. + * Of course, toggling static off will only be that simple in the real world if the test method names are unique across all fixtures that you link together. + * <p> * If you're unsure, a rule of thumb is define either <code>ACEUNIT_EMBEDDED</code> or <code>ACEUNIT_STATIC_ANNOTATIONS</code> but not both. * </dd> * </dl> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-17 21:33:04
|
Revision: 201 http://aceunit.svn.sourceforge.net/aceunit/?rev=201&view=rev Author: christianhujer Date: 2007-11-17 13:33:09 -0800 (Sat, 17 Nov 2007) Log Message: ----------- Added hostname and dummy parameters for missing format arguments. Modified Paths: -------------- trunk/src/native/JUnitXmlLogger.c Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2007-11-17 21:32:47 UTC (rev 200) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-17 21:33:09 UTC (rev 201) @@ -166,11 +166,11 @@ 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"); // TODO + fprintf(globalFile, " <testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" id=\"%d\" name=\"%s\" package=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n", 0/*TODO*/, 0/*TODO*/, globalInfo.hostname, 0/*TODO*/, NULL/*TODO*/, NULL/*TODO*/, 0/*TODO*/, 0.0/*TODO*/, NULL/*TODO*/); 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"); // TODO + fprintf(globalFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n", NULL/*TODO*/, NULL/*TODO*/, 0.0/*TODO*/); } fprintf(globalFile, " <system-out/>\n"); fprintf(globalFile, " <system-err/>\n"); @@ -180,11 +180,11 @@ 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"); // TODO + fprintf(localFile, "<testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" name=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n", 0/*TODO*/, 0/*TODO*/, globalInfo.hostname, NULL/*TODO*/, 0/*TODO*/, 0.0/*TODO*/, NULL/*TODO*/); 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"); // TODO + fprintf(localFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n", NULL/*TODO*/, NULL/*TODO*/, 0.0/*TODO*/); } fprintf(localFile, " <system-out/>\n"); fprintf(localFile, " <system-err/>\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-17 21:32:42
|
Revision: 200 http://aceunit.svn.sourceforge.net/aceunit/?rev=200&view=rev Author: christianhujer Date: 2007-11-17 13:32:47 -0800 (Sat, 17 Nov 2007) Log Message: ----------- Added missing suite logging. Currently suites are identical to fixtures, but this might change in future. Modified Paths: -------------- trunk/src/native/AceUnit.c Modified: trunk/src/native/AceUnit.c =================================================================== --- trunk/src/native/AceUnit.c 2007-11-17 21:05:29 UTC (rev 199) +++ trunk/src/native/AceUnit.c 2007-11-17 21:32:47 UTC (rev 200) @@ -89,6 +89,7 @@ const testMethod_t *testCase; const TestCaseId_t *testId; + globalLog(suiteStarted, NULL); globalLog(fixtureStarted, fixture->id); invokeAll(beforeClass); for (testCase = fixture->testCase, testId = fixture->testId; NULL != *testCase; testCase++, testId++) { @@ -114,6 +115,7 @@ } invokeAll(afterClass); globalLog(fixtureEnded, fixture->id); + globalLog(suiteEnded, NULL); #undef invokeAll #undef globalLog } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-17 21:05:25
|
Revision: 199 http://aceunit.svn.sourceforge.net/aceunit/?rev=199&view=rev Author: christianhujer Date: 2007-11-17 13:05:29 -0800 (Sat, 17 Nov 2007) Log Message: ----------- There are no internal functions left to declare static. TODO removed. Modified Paths: -------------- trunk/TODO Modified: trunk/TODO =================================================================== --- trunk/TODO 2007-11-17 20:58:40 UTC (rev 198) +++ trunk/TODO 2007-11-17 21:05:29 UTC (rev 199) @@ -4,7 +4,6 @@ * 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. * Test AceUnit with AceUnit * Test GenTest with JUnit * Turn runFixture in a non-void function that returns whether one or more test cases failed. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-17 20:58:50
|
Revision: 198 http://aceunit.svn.sourceforge.net/aceunit/?rev=198&view=rev Author: christianhujer Date: 2007-11-17 12:58:40 -0800 (Sat, 17 Nov 2007) Log Message: ----------- Fixed doxygen issues. Modified Paths: -------------- trunk/src/native/ExceptionHandling.h Modified: trunk/src/native/ExceptionHandling.h =================================================================== --- trunk/src/native/ExceptionHandling.h 2007-11-17 11:52:24 UTC (rev 197) +++ trunk/src/native/ExceptionHandling.h 2007-11-17 20:58:40 UTC (rev 198) @@ -30,7 +30,7 @@ * * Example: * <pre> - * #define SomeException 1 + * \#define SomeException 1 * int someMethod() throws(SomeException) { * if (someCondition) { * throw(SomeException); @@ -48,17 +48,17 @@ * </pre> * * Differences to Java - * * Exceptions are only int values. - * * finally MUST not be omitted. - * * endtry MUST not be omitted. - * * returning from a function will NOT execute outer finally blocks. - * * Omitting the {} block at try or catch will eventually not be detected by the compiler but lead to extremely strange behaviour. - * * throw has a slightly different syntax. - * * throws has a slightly different syntax and currently no effect. + * - Exceptions are only int values. + * - finally MUST not be omitted. + * - endtry MUST not be omitted. + * - returning from a function will NOT execute outer finally blocks. + * - Omitting the {} block at try or catch will eventually not be detected by the compiler but lead to extremely strange behaviour. + * - throw has a slightly different syntax. + * - throws has a slightly different syntax and currently no effect. * * Similarities with Java - * * You can have more than one catch clause per try. - * * You can have zero or more catch clauses per try. Yes, having zero catch clauses is allowed. But unlike Java this doesn't make sense in C. + * - You can have more than one catch clause per try. + * - You can have zero or more catch clauses per try. Yes, having zero catch clauses is allowed. But unlike Java this doesn't make sense in C. * * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @file ExceptionHandling.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-17 11:52:20
|
Revision: 197 http://aceunit.svn.sourceforge.net/aceunit/?rev=197&view=rev Author: christianhujer Date: 2007-11-17 03:52:24 -0800 (Sat, 17 Nov 2007) Log Message: ----------- Added comments about the links. Modified Paths: -------------- trunk/src/doc/start.xhtml Modified: trunk/src/doc/start.xhtml =================================================================== --- trunk/src/doc/start.xhtml 2007-11-17 11:45:58 UTC (rev 196) +++ trunk/src/doc/start.xhtml 2007-11-17 11:52:24 UTC (rev 197) @@ -55,10 +55,10 @@ </ul> <h2>Links</h2> <ul> - <li><a href="http://sourceforge.net/projects/aceunit/">AceUnit SourceForge Project Page</a> (Forum, Bug Tracker, Feature Request Tracker, Web access to the SVN repository and more)</li> - <li><a href="http://freshmeat.net/projects/aceunit/">AceUnit FreshMeat Project Page</a></li> - <li><a href="http://cia.navi.cx/stats/project/aceunit">AceUnit CIA project page</a></li> - <li><a href="http://ohloh.net/projects/9006">AceUnit Ohloh project page</a></li> + <li><a href="http://sourceforge.net/projects/aceunit/">AceUnit SourceForge Project Page</a> (Main technical project site, Forum, Bug Tracker, Feature Request Tracker, Web access to the SVN repository and more)</li> + <li><a href="http://freshmeat.net/projects/aceunit/">AceUnit FreshMeat Project Page</a> (Overview, Release subscription)</li> + <li><a href="http://cia.navi.cx/stats/project/aceunit">AceUnit CIA project page</a> (Commit statistics, contribution information)</li> + <li><a href="http://ohloh.net/projects/9006">AceUnit Ohloh project page</a> (source statistics, project value, some metrics)</li> </ul> </body> </html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-17 11:45:54
|
Revision: 196 http://aceunit.svn.sourceforge.net/aceunit/?rev=196&view=rev Author: christianhujer Date: 2007-11-17 03:45:58 -0800 (Sat, 17 Nov 2007) Log Message: ----------- Removed a TODO. Catching SIGABRT probably is not a use case for 99.9% of the users. Modified Paths: -------------- trunk/TODO Modified: trunk/TODO =================================================================== --- trunk/TODO 2007-11-17 10:55:55 UTC (rev 195) +++ trunk/TODO 2007-11-17 11:45:58 UTC (rev 196) @@ -8,7 +8,6 @@ * Test AceUnit with AceUnit * Test GenTest with JUnit * Turn runFixture in a non-void function that returns whether one or more test cases failed. -* Add optional SIGABRT handlers for ACEUNIT_ASSERTION_STYLE_ASSERT resp. ACEUNIT_ASSERTION_STYLE_ABORT. * Add randomization of test order. * Add JUnit-compatible loggers. * Add proper runner tree that makes makes use of every logger method. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-17 10:55:52
|
Revision: 195 http://aceunit.svn.sourceforge.net/aceunit/?rev=195&view=rev Author: christianhujer Date: 2007-11-17 02:55:55 -0800 (Sat, 17 Nov 2007) Log Message: ----------- Implemented choosable assertion aborts. Longjmp, the most important one, already is tested. Modified Paths: -------------- trunk/TODO trunk/src/native/AceUnit.c trunk/src/native/AceUnit.h trunk/src/native/test/basic/AceUnitTest.c Added Paths: ----------- trunk/src/native/test/longjmp/ trunk/src/native/test/longjmp/LongJmpTest.c trunk/src/native/test/longjmp/Makefile Modified: trunk/TODO =================================================================== --- trunk/TODO 2007-11-17 10:29:47 UTC (rev 194) +++ trunk/TODO 2007-11-17 10:55:55 UTC (rev 195) @@ -8,7 +8,7 @@ * 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 +* Add optional SIGABRT handlers for ACEUNIT_ASSERTION_STYLE_ASSERT resp. ACEUNIT_ASSERTION_STYLE_ABORT. * Add randomization of test order. * Add JUnit-compatible loggers. * Add proper runner tree that makes makes use of every logger method. Modified: trunk/src/native/AceUnit.c =================================================================== --- trunk/src/native/AceUnit.c 2007-11-17 10:29:47 UTC (rev 194) +++ trunk/src/native/AceUnit.c 2007-11-17 10:55:55 UTC (rev 195) @@ -32,6 +32,10 @@ #include "AceUnit.h" +#if ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_LONGJMP +#include <setjmp.h> +#endif + /** The most recent error will be remembered here. * This variable will be set by {@link #recordError()} and read by {@link #runFixture()}. * It is set to NULL before each test case. @@ -67,6 +71,10 @@ /** The Logger. */ extern TestLogger_t *globalLogger; +#if ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_LONGJMP +jmp_buf aceunitJmpBuf; +#endif + /** Runs all test cases from a test fixture. * @param fixture Test fixture to run. */ @@ -88,7 +96,13 @@ globalLog(testCaseStarted, currentTestId); invokeAll(before); recentError = NULL; - (*testCase)(); +#if ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_LONGJMP + if (!(setjmp(aceunitJmpBuf))) { +#endif + (*testCase)(); +#if ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_LONGJMP + } +#endif testCaseCount++; if (NULL != recentError) { globalLog(testCaseFailed, recentError); Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2007-11-17 10:29:47 UTC (rev 194) +++ trunk/src/native/AceUnit.h 2007-11-17 10:55:55 UTC (rev 195) @@ -76,6 +76,111 @@ #include "AceUnitAnnotations.h" +/** Value for #ACEUNIT_ASSERTION_STYLE for using <code>return</code> for assertions to abort test cases. + * This is primarily meant for embedded systems where everything should be as small and simple as possible. + * It is also currently used by AceUnit when AceUnit tests itself. + * + * @warning This assertion style has a severe disadvantage. + * Assertions in this style will only work as expected if the assertion appears directly in the test case. + * If an assertion is placed in a function invoked from a test case, the assertion error will be stored. + * But the test case will not be aborted. + * If another assertion occurs it will overwrite the previous assertion even before the assertion is logged. + * Therefore you SHOULD NOT use this assertion style unless you really explicitely want it. + * + * @see #ACEUNIT_ASSERTION_STYLE + */ +#define ACEUNIT_ASSERTION_STYLE_RETURN 1 + +/** Value for #ACEUNIT_ASSERTION_STYLE for using <code>assert</code> for assertions to abort test cases. + * It will use <code>assert.h</code> from ISO C. + * Because of that do not define <code>NDEBUG</code>. + * + * @warning If you define <code>NDEBUG</code> with this assertion style, assertions will not work as expected. + * The test case will not be aborted. + * If another assertion occurs it will overwrite the previous assertion even before the assertion is logged. + * Therefore you MUST NOT define <code>NDEBUG</code> with this assertion style. + * + * @note If you use this assertion style, the first assertion will invoke <code>assert()</code> and therefore exit the test program. + * Normal logging is useless in conjunction with this assertion style. + * This assertion style is especially useful for debugging when <code>assert()</code> is useful in your debugging environment. + * + * @todo instead of exiting, optionally catch SIGABRT with a signal handler + * + * @see #ACEUNIT_ASSERTION_STYLE + */ +#define ACEUNIT_ASSERTION_STYLE_ASSERT 2 + +/** Value for #ACEUNIT_ASSERTION_STYLE for using <code>abort()</code> for assertions to abort. + * It will use <code>stdlib.h</code> from ISO C. + * + * @note If you use this assertion style, the first assertion will invoke <code>abort()</code> and therefore exit the test program. + * Normal logging is useless in conjunction with this assertion style. + * + * @todo instead of exiting, optionally catch SIGABRT with a signal handler + * + * @see #ACEUNIT_ASSERTION_STYLE + */ +#define ACEUNIT_ASSERTION_STYLE_ABORT 3 + +/** Value for #ACEUNIT_ASSERTION_STYLE for using <code>longjmp()</code> for assertions to abort. + * It will use <code>setjmp.h</code> from ISO C. + * + * This is the preferred assertion style and therefore default for AceUnit. + * + * @see #ACEUNIT_ASSERTION_STYLE + */ +#define ACEUNIT_ASSERTION_STYLE_LONGJMP 4 + +/** Value for #ACEUNIT_ASSERTION_STYLE for using custom assertion aborts. + * If you use this for #ACEUNIT_ASSERTION_STYLE, you also MUST define the macro #ACEUNIT_CUSTOM_ASSERT to the code you want to use to make assertions abort test cases. + * + * @see #ACEUNIT_ASSERTION_STYLE + */ +#define ACEUNIT_ASSERTION_STYLE_CUSTOM 5 + +#ifndef ACEUNIT_ASSERTION_STYLE +/** Determines the style of assertions to use. + * Defaults to #ACEUNIT_ASSERTION_STYLE_CUSTOM if ACEUNIT_CUSTOM_ASSERT is defined. + * Defaults to #ACEUNIT_ASSERTION_STYLE_LONGJMP otherwise. + * + * @see #ACEUNIT_ASSERTION_STYLE_RETURN + * @see #ACEUNIT_ASSERTION_STYLE_ASSERT + * @see #ACEUNIT_ASSERTION_STYLE_ABORT + * @see #ACEUNIT_ASSERTION_STYLE_LONGJMP + * @see #ACEUNIT_ASSERTION_STYLE_CUSTOM + */ +#ifdef ACEUNIT_CUSTOM_ASSERT +#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_CUSTOM +#else +#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_LONGJMP +#endif +#endif + +#if ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_CUSTOM +#ifndef ACEUNIT_CUSTOM_ASSERT +#error You MUST define ACEUNIT_CUSTOM_ASSERT when using ACEUNIT_ASSERTION_STYLE_CUSTOM. +#endif +#endif + +/** Code for aborting a test case in case of an assertion. */ +#if ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_RETURN +#define ACEUNIT_ABORT return +#elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_ASSERT +#include <assert.h> +#define ACEUNIT_ABORT assert(false) +#elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_ABORT +#include <stdlib.h> +#define ACEUNIT_ABORT abort() +#elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_LONGJMP +#include <setjmp.h> +extern jmp_buf aceunitJmpBuf; +#define ACEUNIT_ABORT longjmp(aceunitJmpBuf, 1) +#elif ACEUNIT_ASSERTION_STYLE == ACEUNIT_ASSERTION_STYLE_CUSTOM +#define ACEUNIT_ABORT ACEUNIT_CUSTOM_ASSERT +#else +#error Unknown value for ACEUNIT_ASSERTION_STYLE +#endif + /** FixtureId_t specifies a test fixture. * On embedded systems, this is a 16 bit quantity that uniquely identifies the test fixture. * On normal systems, this is the filename of fixture. @@ -123,9 +228,9 @@ * @param message Message to create. */ #ifdef ACEUNIT_EMBEDDED -#define newAssertionError(message) recordError(A_FIXTURE_ID, (AssertionId_t) {__LINE__}); return +#define newAssertionError(message) recordError(A_FIXTURE_ID, (AssertionId_t) {__LINE__}); ACEUNIT_ABORT #else -#define newAssertionError(message) recordError(__FILE__, (AssertionId_t) {__LINE__, message}); return +#define newAssertionError(message) recordError(__FILE__, (AssertionId_t) {__LINE__, message}); ACEUNIT_ABORT #endif /** Assertion Error. Modified: trunk/src/native/test/basic/AceUnitTest.c =================================================================== --- trunk/src/native/test/basic/AceUnitTest.c 2007-11-17 10:29:47 UTC (rev 194) +++ trunk/src/native/test/basic/AceUnitTest.c 2007-11-17 10:55:55 UTC (rev 195) @@ -34,6 +34,8 @@ #include <stdbool.h> #include <stdio.h> +#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_RETURN + #include "AceUnitTest.h" extern AssertionError_t* recentError; Added: trunk/src/native/test/longjmp/LongJmpTest.c =================================================================== --- trunk/src/native/test/longjmp/LongJmpTest.c (rev 0) +++ trunk/src/native/test/longjmp/LongJmpTest.c 2007-11-17 10:55:55 UTC (rev 195) @@ -0,0 +1,72 @@ +/* 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 that uses longjmp. + * Yes, AceUnit can be tested using itself. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @file LongJumpTest.c + */ + +#include <stdbool.h> +#include <stdio.h> + +#define ACEUNIT_ASSERTION_STYLE ACEUNIT_ASSERTION_STYLE_LONGJMP + +#include "LongJmpTest.h" + +/** Tests that {@link #assertTrue()} does a longjmp. */ +A_Test void testAssertDoesLongjmp() { + void helper() { + assertTrue("Test assertion, expected to fail.", false); + } + helper(); + fail("This statement should not be reached."); +} + +/** Tests that {@link #assertEquals()} with unequal values sets recentError. */ +A_Test void testAssertDoesLongjmp2() { + void helper() { + assertTrue("Test assertion, expected to fail.", false); + } + helper(); +} + +/** 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(&LongJmpTestFixture); + extern uint16_t testCaseCount; + extern uint16_t testCaseFailureCount; + printf("Test Cases: %d Errors: %d (expecting 2)\n", testCaseCount, testCaseFailureCount); + return testCaseFailureCount != 2; +} Property changes on: trunk/src/native/test/longjmp/LongJmpTest.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/src/native/test/longjmp/Makefile =================================================================== --- trunk/src/native/test/longjmp/Makefile (rev 0) +++ trunk/src/native/test/longjmp/Makefile 2007-11-17 10:55:55 UTC (rev 195) @@ -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=LongJmpTest + +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-17 10:29:42
|
Revision: 194 http://aceunit.svn.sourceforge.net/aceunit/?rev=194&view=rev Author: christianhujer Date: 2007-11-17 02:29:47 -0800 (Sat, 17 Nov 2007) Log Message: ----------- Moved exception handling test to a directory of its own. Added Makefile for that. Added Paths: ----------- trunk/src/native/test/exhand/ trunk/src/native/test/exhand/Makefile trunk/src/native/test/exhand/TryExceptionHandling.c Removed Paths: ------------- trunk/src/native/TryExceptionHandling.c Deleted: trunk/src/native/TryExceptionHandling.c =================================================================== --- trunk/src/native/TryExceptionHandling.c 2007-11-17 10:23:23 UTC (rev 193) +++ trunk/src/native/TryExceptionHandling.c 2007-11-17 10:29:47 UTC (rev 194) @@ -1,35 +0,0 @@ -#include "ExceptionHandling.h" -#include <stdlib.h> -#include <assert.h> -#include <stdio.h> -#include <stdbool.h> - -int main(int argc, char *argv[]) { - int count = 0; - assert(++count == 1); // should be reached. - try { - assert(++count == 2); // should be reached. - try { - assert(++count == 3); // should be reached. - try { - assert(++count == 4); // should be reached. - throw(1); - assert(false); // should NOT be reached. - } catch (2) { - assert(false); // should NOT be reached. - } finally { - assert(++count == 5); // should be reached. - } endtry; - } catch (1) { - assert(++count == 6); // should be reached. - } finally { - assert(++count == 7); // should be reached. - } endtry; - assert(++count == 8); // should be reached. - } finally { - assert(++count == 9); // should be reached. - } endtry; - assert(++count == 10); // should be reached. - printf("done.\n"); - return 0; -} Added: trunk/src/native/test/exhand/Makefile =================================================================== --- trunk/src/native/test/exhand/Makefile (rev 0) +++ trunk/src/native/test/exhand/Makefile 2007-11-17 10:29:47 UTC (rev 194) @@ -0,0 +1,31 @@ +ACE_UNIT_FILES=ExceptionHandling.c ExceptionHandling.h + +ACE_UNIT_PATH=../../../ + +all: prepare compile test + +clean: + rm -f $(ACE_UNIT_FILES) runTests *.gcov *.gcno *.gcda + +prepare: $(ACE_UNIT_FILES) + +ExceptionHandling.c: $(ACE_UNIT_PATH)/native/ExceptionHandling.c + cp $< $@ + +ExceptionHandling.h: $(ACE_UNIT_PATH)/native/ExceptionHandling.h + cp $< $@ + +compile: runTests + +runTests: $(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/exhand/TryExceptionHandling.c (from rev 192, trunk/src/native/TryExceptionHandling.c) =================================================================== --- trunk/src/native/test/exhand/TryExceptionHandling.c (rev 0) +++ trunk/src/native/test/exhand/TryExceptionHandling.c 2007-11-17 10:29:47 UTC (rev 194) @@ -0,0 +1,35 @@ +#include "ExceptionHandling.h" +#include <stdlib.h> +#include <assert.h> +#include <stdio.h> +#include <stdbool.h> + +int main(int argc, char *argv[]) { + int count = 0; + assert(++count == 1); // should be reached. + try { + assert(++count == 2); // should be reached. + try { + assert(++count == 3); // should be reached. + try { + assert(++count == 4); // should be reached. + throw(1); + assert(false); // should NOT be reached. + } catch (2) { + assert(false); // should NOT be reached. + } finally { + assert(++count == 5); // should be reached. + } endtry; + } catch (1) { + assert(++count == 6); // should be reached. + } finally { + assert(++count == 7); // should be reached. + } endtry; + assert(++count == 8); // should be reached. + } finally { + assert(++count == 9); // should be reached. + } endtry; + assert(++count == 10); // should be reached. + printf("done.\n"); + return 0; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-17 10:23:20
|
Revision: 193 http://aceunit.svn.sourceforge.net/aceunit/?rev=193&view=rev Author: christianhujer Date: 2007-11-17 02:23:23 -0800 (Sat, 17 Nov 2007) Log Message: ----------- Added TODO comments to formats with too few arguments. Modified Paths: -------------- trunk/src/native/JUnitXmlLogger.c Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2007-11-16 23:56:58 UTC (rev 192) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-17 10:23:23 UTC (rev 193) @@ -166,11 +166,11 @@ 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, " <testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" id=\"%d\" name=\"%s\" package=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n"); // TODO 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"); + fprintf(globalFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n"); // TODO } fprintf(globalFile, " <system-out/>\n"); fprintf(globalFile, " <system-err/>\n"); @@ -180,11 +180,11 @@ 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, "<testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" name=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n"); // TODO 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, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n"); // TODO } fprintf(localFile, " <system-out/>\n"); fprintf(localFile, " <system-err/>\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-16 23:56:54
|
Revision: 192 http://aceunit.svn.sourceforge.net/aceunit/?rev=192&view=rev Author: christianhujer Date: 2007-11-16 15:56:58 -0800 (Fri, 16 Nov 2007) Log Message: ----------- Added documentation about the assertions. Modified Paths: -------------- trunk/src/native/TryExceptionHandling.c Modified: trunk/src/native/TryExceptionHandling.c =================================================================== --- trunk/src/native/TryExceptionHandling.c 2007-11-16 23:55:18 UTC (rev 191) +++ trunk/src/native/TryExceptionHandling.c 2007-11-16 23:56:58 UTC (rev 192) @@ -6,30 +6,30 @@ int main(int argc, char *argv[]) { int count = 0; - assert(++count == 1); + assert(++count == 1); // should be reached. try { - assert(++count == 2); + assert(++count == 2); // should be reached. try { - assert(++count == 3); + assert(++count == 3); // should be reached. try { - assert(++count == 4); + assert(++count == 4); // should be reached. throw(1); - assert(false); + assert(false); // should NOT be reached. } catch (2) { - assert(false); + assert(false); // should NOT be reached. } finally { - assert(++count == 5); + assert(++count == 5); // should be reached. } endtry; } catch (1) { - assert(++count == 6); + assert(++count == 6); // should be reached. } finally { - assert(++count == 7); + assert(++count == 7); // should be reached. } endtry; - assert(++count == 8); + assert(++count == 8); // should be reached. } finally { - assert(++count == 9); + assert(++count == 9); // should be reached. } endtry; - assert(++count == 10); + assert(++count == 10); // should be reached. printf("done.\n"); return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-16 23:55:14
|
Revision: 191 http://aceunit.svn.sourceforge.net/aceunit/?rev=191&view=rev Author: christianhujer Date: 2007-11-16 15:55:18 -0800 (Fri, 16 Nov 2007) Log Message: ----------- Added try-out for exception handling. That's a hack and should be moved somewhere else plus use AceUnit instead. Added Paths: ----------- trunk/src/native/TryExceptionHandling.c Added: trunk/src/native/TryExceptionHandling.c =================================================================== --- trunk/src/native/TryExceptionHandling.c (rev 0) +++ trunk/src/native/TryExceptionHandling.c 2007-11-16 23:55:18 UTC (rev 191) @@ -0,0 +1,35 @@ +#include "ExceptionHandling.h" +#include <stdlib.h> +#include <assert.h> +#include <stdio.h> +#include <stdbool.h> + +int main(int argc, char *argv[]) { + int count = 0; + assert(++count == 1); + try { + assert(++count == 2); + try { + assert(++count == 3); + try { + assert(++count == 4); + throw(1); + assert(false); + } catch (2) { + assert(false); + } finally { + assert(++count == 5); + } endtry; + } catch (1) { + assert(++count == 6); + } finally { + assert(++count == 7); + } endtry; + assert(++count == 8); + } finally { + assert(++count == 9); + } endtry; + assert(++count == 10); + printf("done.\n"); + return 0; +} Property changes on: trunk/src/native/TryExceptionHandling.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-16 23:54:45
|
Revision: 190 http://aceunit.svn.sourceforge.net/aceunit/?rev=190&view=rev Author: christianhujer Date: 2007-11-16 15:54:48 -0800 (Fri, 16 Nov 2007) Log Message: ----------- Improved documentation. Modified Paths: -------------- trunk/src/native/ExceptionHandling.h Modified: trunk/src/native/ExceptionHandling.h =================================================================== --- trunk/src/native/ExceptionHandling.h 2007-11-16 23:43:32 UTC (rev 189) +++ trunk/src/native/ExceptionHandling.h 2007-11-16 23:54:48 UTC (rev 190) @@ -73,7 +73,7 @@ * * Make sure that the scheduler starts each thread with an initialized jmp_buf (invoke setjmp() once!), otherwise your system will get very upset about uncaught exceptions. * - * If you work in a single-threaded environment, still make sure that setjmp() is invoked at least once, otherwise your system will get very upset + * If you work in a single-threaded environment, still make sure that setjmp(*currentExceptionBuffer) is invoked at least once at the very beginning, otherwise your system will get very upset * about uncaught exceptions. */ extern jmp_buf *currentExceptionBuffer; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-16 23:43:32
|
Revision: 189 http://aceunit.svn.sourceforge.net/aceunit/?rev=189&view=rev Author: christianhujer Date: 2007-11-16 15:43:32 -0800 (Fri, 16 Nov 2007) Log Message: ----------- Fixed bug with finally. Added documentation. Modified Paths: -------------- trunk/src/native/ExceptionHandling.h Modified: trunk/src/native/ExceptionHandling.h =================================================================== --- trunk/src/native/ExceptionHandling.h 2007-11-16 23:13:12 UTC (rev 188) +++ trunk/src/native/ExceptionHandling.h 2007-11-16 23:43:32 UTC (rev 189) @@ -27,6 +27,39 @@ /** Java-like exceptions for C. * This is part of AceUnit but can also be used without AceUnit. + * + * Example: + * <pre> + * #define SomeException 1 + * int someMethod() throws(SomeException) { + * if (someCondition) { + * throw(SomeException); + * } + * } + * + * int someCaller() { + * try { + * someMethod(); + * } catch (SomeException) { + * // handle this exception + * } finally { + * } endtry; + * } + * </pre> + * + * Differences to Java + * * Exceptions are only int values. + * * finally MUST not be omitted. + * * endtry MUST not be omitted. + * * returning from a function will NOT execute outer finally blocks. + * * Omitting the {} block at try or catch will eventually not be detected by the compiler but lead to extremely strange behaviour. + * * throw has a slightly different syntax. + * * throws has a slightly different syntax and currently no effect. + * + * Similarities with Java + * * You can have more than one catch clause per try. + * * You can have zero or more catch clauses per try. Yes, having zero catch clauses is allowed. But unlike Java this doesn't make sense in C. + * * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @file ExceptionHandling.h */ @@ -48,20 +81,23 @@ /** Start execution of code which might throw an exception that might be caught by the exception handlers that follow this try. * @warning Never omit #finally */ -#define try { jmp_buf lbuf; int jmpret; memcpy(&lbuf, ¤tExceptionBuffer, sizeof(jmp_buf)); if (!(jmpret = setjmp(currentExceptionBuffer))) +#define try do { int jmpret; { jmp_buf lbuf; memcpy(&lbuf, currentExceptionBuffer, sizeof(jmp_buf)); if (!(jmpret = setjmp(*currentExceptionBuffer))) /** Define an exception handler. * @param X exception to catch, MUST be of type int. */ -#define catch(X) else if ((X) == jmpret) +#define catch(X) else if ((X) == jmpret && !(jmpret = 0)) -/** End exception handlers. */ -#define finally else { memcpy(¤tExceptionBuffer, &lbuf, sizeof(jmp_buf)); longjmp(currentExceptionBuffer, jmpret); } memcpy(¤tExceptionBuffer, &lbuf, sizeof(jmp_buf)); } +/** Always execute this code. */ +#define finally memcpy(currentExceptionBuffer, &lbuf, sizeof(jmp_buf)); } +/** End exception handling. */ +#define endtry if (jmpret) { longjmp(*currentExceptionBuffer, jmpret); } } while(0) + /** Throw an exception. * @param X Exception to throw, MUST be of type int. */ -#define throw(X) longjmp(currentExceptionBuffer, (X)); +#define throw(X) longjmp(*currentExceptionBuffer, (X)); /** Declare that a function throws an exception of this type. * This is currently unused but might be used in future by additional tools that could look for uncaught exceptions. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-11-16 23:13:11
|
Revision: 188 http://aceunit.svn.sourceforge.net/aceunit/?rev=188&view=rev Author: christianhujer Date: 2007-11-16 15:13:12 -0800 (Fri, 16 Nov 2007) Log Message: ----------- Added exception handling. Added Paths: ----------- trunk/src/native/ExceptionHandling.c trunk/src/native/ExceptionHandling.h Added: trunk/src/native/ExceptionHandling.c =================================================================== --- trunk/src/native/ExceptionHandling.c (rev 0) +++ trunk/src/native/ExceptionHandling.c 2007-11-16 23:13:12 UTC (rev 188) @@ -0,0 +1,48 @@ +/* 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. + */ + +/** Java-like exceptions for C. + * This is part of AceUnit but can also be used without AceUnit. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @file ExceptionHandling.c + */ + +#include <setjmp.h> + +/** The global exception buffer for single-threaded programs. */ +jmp_buf exceptionBuffer; + +/** The exception buffer of the current thread. + * If you work in a multi-threaded environment, make sure the scheduler allocates a jmp_buf for each thread and initializes currentExceptionBuffer for that thread with each conext switch. + * If you don't, your system will get very upset about interrupted exceptions. + * + * Make sure that the scheduler starts each thread with an initialized jmp_buf (invoke setjmp() once!), otherwise your system will get very upset about uncaught exceptions. + * + * If you work in a single-threaded environment, still make sure that setjmp() is invoked at least once, otherwise your system will get very upset + * about uncaught exceptions. + */ +jmp_buf *currentExceptionBuffer = &exceptionBuffer; Property changes on: trunk/src/native/ExceptionHandling.c ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + native Added: trunk/src/native/ExceptionHandling.h =================================================================== --- trunk/src/native/ExceptionHandling.h (rev 0) +++ trunk/src/native/ExceptionHandling.h 2007-11-16 23:13:12 UTC (rev 188) @@ -0,0 +1,70 @@ +/* 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. + */ + +/** Java-like exceptions for C. + * This is part of AceUnit but can also be used without AceUnit. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + * @file ExceptionHandling.h + */ + +#include <setjmp.h> +#include <string.h> + +/** The exception buffer of the current thread. + * If you work in a multi-threaded environment, make sure the scheduler allocates a jmp_buf for each thread and initializes currentExceptionBuffer for that thread with each conext switch. + * If you don't, your system will get very upset about interrupted exceptions. + * + * Make sure that the scheduler starts each thread with an initialized jmp_buf (invoke setjmp() once!), otherwise your system will get very upset about uncaught exceptions. + * + * If you work in a single-threaded environment, still make sure that setjmp() is invoked at least once, otherwise your system will get very upset + * about uncaught exceptions. + */ +extern jmp_buf *currentExceptionBuffer; + +/** Start execution of code which might throw an exception that might be caught by the exception handlers that follow this try. + * @warning Never omit #finally + */ +#define try { jmp_buf lbuf; int jmpret; memcpy(&lbuf, ¤tExceptionBuffer, sizeof(jmp_buf)); if (!(jmpret = setjmp(currentExceptionBuffer))) + +/** Define an exception handler. + * @param X exception to catch, MUST be of type int. + */ +#define catch(X) else if ((X) == jmpret) + +/** End exception handlers. */ +#define finally else { memcpy(¤tExceptionBuffer, &lbuf, sizeof(jmp_buf)); longjmp(currentExceptionBuffer, jmpret); } memcpy(¤tExceptionBuffer, &lbuf, sizeof(jmp_buf)); } + +/** Throw an exception. + * @param X Exception to throw, MUST be of type int. + */ +#define throw(X) longjmp(currentExceptionBuffer, (X)); + +/** Declare that a function throws an exception of this type. + * This is currently unused but might be used in future by additional tools that could look for uncaught exceptions. + * @param X Exception type to declare, MUST be of type int. + */ +#define throws(X) Property changes on: trunk/src/native/ExceptionHandling.h ___________________________________________________________________ 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:30:33
|
Revision: 187 http://aceunit.svn.sourceforge.net/aceunit/?rev=187&view=rev Author: christianhujer Date: 2007-11-11 16:30:34 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Added TODO. Modified Paths: -------------- trunk/TODO Modified: trunk/TODO =================================================================== --- trunk/TODO 2007-11-12 00:28:57 UTC (rev 186) +++ trunk/TODO 2007-11-12 00:30:34 UTC (rev 187) @@ -11,3 +11,4 @@ * 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. +* Add proper runner tree that makes makes use of every logger method. 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:28:55
|
Revision: 186 http://aceunit.svn.sourceforge.net/aceunit/?rev=186&view=rev Author: christianhujer Date: 2007-11-11 16:28:57 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Changed makefile to not fail for this testsuite as it is expected to contain failing tests. Modified Paths: -------------- trunk/src/native/test/xmlLog/Makefile Modified: trunk/src/native/test/xmlLog/Makefile =================================================================== --- trunk/src/native/test/xmlLog/Makefile 2007-11-12 00:27:41 UTC (rev 185) +++ trunk/src/native/test/xmlLog/Makefile 2007-11-12 00:28:57 UTC (rev 186) @@ -46,7 +46,7 @@ # $(CC) -fprofile-arcs -ftest-coverage -Wall -g -DACEUNIT_EMBEDDED -o runTests *.c test: runTests - ./runTests + ./runTests ; echo $$? ; true doc: $(FIXTURE_NAME).c $(FIXTURE_NAME).h $(ACE_UNIT_FILES) doxygen 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:27:36
|
Revision: 185 http://aceunit.svn.sourceforge.net/aceunit/?rev=185&view=rev Author: christianhujer Date: 2007-11-11 16:27:41 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Fixed bug in globalLogger initialization. Modified Paths: -------------- trunk/src/native/FullPlainLogger.c trunk/src/native/JUnitXmlLogger.c trunk/src/native/MiniRamLogger.c Modified: trunk/src/native/FullPlainLogger.c =================================================================== --- trunk/src/native/FullPlainLogger.c 2007-11-12 00:26:30 UTC (rev 184) +++ trunk/src/native/FullPlainLogger.c 2007-11-12 00:27:41 UTC (rev 185) @@ -64,4 +64,4 @@ NULL }; -TestLogger_t *globalLogger = FullPlainLogger; // XXX Hack. Remove. +TestLogger_t *globalLogger = &FullPlainLogger; // XXX Hack. Remove. Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2007-11-12 00:26:30 UTC (rev 184) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-12 00:27:41 UTC (rev 185) @@ -211,4 +211,4 @@ runnerEnded }; -TestLogger_t *globalLogger = FullPlainLogger; // XXX Hack. Remove. +TestLogger_t *globalLogger = &JUnitXmlLogger; // XXX Hack. Remove. Modified: trunk/src/native/MiniRamLogger.c =================================================================== --- trunk/src/native/MiniRamLogger.c 2007-11-12 00:26:30 UTC (rev 184) +++ trunk/src/native/MiniRamLogger.c 2007-11-12 00:27:41 UTC (rev 185) @@ -79,7 +79,7 @@ } /** This Logger. */ -TestLogger_t FullPlainLogger = { +TestLogger_t MiniRamLogger = { NULL, NULL, NULL, @@ -91,4 +91,4 @@ NULL }; -TestLogger_t *globalLogger = FullPlainLogger; // XXX Hack. Remove. +TestLogger_t *globalLogger = &MiniRamLogger; // XXX Hack. Remove. 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:26:25
|
Revision: 184 http://aceunit.svn.sourceforge.net/aceunit/?rev=184&view=rev Author: christianhujer Date: 2007-11-11 16:26:30 -0800 (Sun, 11 Nov 2007) Log Message: ----------- Hack to get at least a single logger running. Modified Paths: -------------- trunk/src/native/FullPlainLogger.c trunk/src/native/JUnitXmlLogger.c trunk/src/native/MiniRamLogger.c Modified: trunk/src/native/FullPlainLogger.c =================================================================== --- trunk/src/native/FullPlainLogger.c 2007-11-12 00:24:31 UTC (rev 183) +++ trunk/src/native/FullPlainLogger.c 2007-11-12 00:26:30 UTC (rev 184) @@ -63,3 +63,5 @@ NULL, NULL }; + +TestLogger_t *globalLogger = FullPlainLogger; // XXX Hack. Remove. Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2007-11-12 00:24:31 UTC (rev 183) +++ trunk/src/native/JUnitXmlLogger.c 2007-11-12 00:26:30 UTC (rev 184) @@ -210,3 +210,5 @@ suiteEnded, runnerEnded }; + +TestLogger_t *globalLogger = FullPlainLogger; // XXX Hack. Remove. Modified: trunk/src/native/MiniRamLogger.c =================================================================== --- trunk/src/native/MiniRamLogger.c 2007-11-12 00:24:31 UTC (rev 183) +++ trunk/src/native/MiniRamLogger.c 2007-11-12 00:26:30 UTC (rev 184) @@ -90,3 +90,5 @@ NULL, NULL }; + +TestLogger_t *globalLogger = FullPlainLogger; // XXX Hack. Remove. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |