aceunit-commit Mailing List for AceUnit (Page 12)
Status: Beta
Brought to you by:
christianhujer
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(139) |
Nov
(77) |
Dec
(32) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(55) |
Feb
(11) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(9) |
Oct
(75) |
Nov
(57) |
Dec
(21) |
2009 |
Jan
(14) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(24) |
Sep
(11) |
Oct
(1) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
(21) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
From: <chr...@us...> - 2008-01-17 22:12:31
|
Revision: 308 http://aceunit.svn.sourceforge.net/aceunit/?rev=308&view=rev Author: christianhujer Date: 2008-01-17 14:12:05 -0800 (Thu, 17 Jan 2008) Log Message: ----------- Created branch for 0.6. Added Paths: ----------- branches/0.6/ Copied: branches/0.6 (from rev 307, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-17 21:32:03
|
Revision: 307 http://aceunit.svn.sourceforge.net/aceunit/?rev=307&view=rev Author: christianhujer Date: 2008-01-17 13:30:44 -0800 (Thu, 17 Jan 2008) Log Message: ----------- Creating release tag 0.5.1 for branch 0.5. Added Paths: ----------- tags/0.5.1/ Copied: tags/0.5.1 (from rev 306, branches/0.5) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-17 21:24:52
|
Revision: 306 http://aceunit.svn.sourceforge.net/aceunit/?rev=306&view=rev Author: christianhujer Date: 2008-01-17 13:23:29 -0800 (Thu, 17 Jan 2008) Log Message: ----------- [ 1874120 ] Generator Unit Test SuiteTest doesn't compile Modified Paths: -------------- branches/0.5/src/java/src/prj/net/sf/aceunit/Fixture.java branches/0.5/src/java/src/prj/net/sf/aceunit/Pckg.java branches/0.5/src/java/src/prj/net/sf/aceunit/Suite.java branches/0.5/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java Modified: branches/0.5/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- branches/0.5/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-17 21:20:57 UTC (rev 305) +++ branches/0.5/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-17 21:23:29 UTC (rev 306) @@ -99,6 +99,7 @@ } /** {@inheritDoc} */ + @NotNull public String getCode(@NotNull final String basename) { final Formatter out = new Formatter(); out.format("/** AceUnit test header file for fixture %s.%n", basename); Modified: branches/0.5/src/java/src/prj/net/sf/aceunit/Pckg.java =================================================================== --- branches/0.5/src/java/src/prj/net/sf/aceunit/Pckg.java 2008-01-17 21:20:57 UTC (rev 305) +++ branches/0.5/src/java/src/prj/net/sf/aceunit/Pckg.java 2008-01-17 21:23:29 UTC (rev 306) @@ -64,6 +64,7 @@ } /** {@inheritDoc} */ + @NotNull public String getCode(@NotNull final String basename) { final Formatter out = new Formatter(); out.format("/** AceUnit test header file for suite %s.%n", basename); Modified: branches/0.5/src/java/src/prj/net/sf/aceunit/Suite.java =================================================================== --- branches/0.5/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-17 21:20:57 UTC (rev 305) +++ branches/0.5/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-17 21:23:29 UTC (rev 306) @@ -62,6 +62,6 @@ * @param basename Base name of this Suite. * @return String with the C-Source for this Suite. */ - public abstract String getCode(@NotNull final String basename); + @NotNull public abstract String getCode(@NotNull final String basename); } // class Pckg Modified: branches/0.5/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java =================================================================== --- branches/0.5/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2008-01-17 21:20:57 UTC (rev 305) +++ branches/0.5/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2008-01-17 21:23:29 UTC (rev 306) @@ -30,6 +30,7 @@ import net.sf.aceunit.Suite; import org.junit.Test; import org.junit.Assert; +import org.jetbrains.annotations.NotNull; /** UnitTest for {@link Suite}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> @@ -46,6 +47,11 @@ public boolean containsTests() { return false; } + /** {@inheritDoc} */ + @NotNull + public String getCode(@NotNull final String basename) { + return ""; + } }; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-17 21:21:59
|
Revision: 305 http://aceunit.svn.sourceforge.net/aceunit/?rev=305&view=rev Author: christianhujer Date: 2008-01-17 13:20:57 -0800 (Thu, 17 Jan 2008) Log Message: ----------- [ 1874120 ] Generator Unit Test SuiteTest doesn't compile Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/java/src/prj/net/sf/aceunit/Pckg.java trunk/src/java/src/prj/net/sf/aceunit/Suite.java trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-17 21:13:16 UTC (rev 304) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-17 21:20:57 UTC (rev 305) @@ -99,6 +99,7 @@ } /** {@inheritDoc} */ + @NotNull public String getCode(@NotNull final String basename) { final Formatter out = new Formatter(); out.format("/** AceUnit test header file for fixture %s.%n", basename); Modified: trunk/src/java/src/prj/net/sf/aceunit/Pckg.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2008-01-17 21:13:16 UTC (rev 304) +++ trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2008-01-17 21:20:57 UTC (rev 305) @@ -64,6 +64,7 @@ } /** {@inheritDoc} */ + @NotNull public String getCode(@NotNull final String basename) { final Formatter out = new Formatter(); out.format("/** AceUnit test header file for suite %s.%n", basename); Modified: trunk/src/java/src/prj/net/sf/aceunit/Suite.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-17 21:13:16 UTC (rev 304) +++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-17 21:20:57 UTC (rev 305) @@ -62,6 +62,6 @@ * @param basename Base name of this Suite. * @return String with the C-Source for this Suite. */ - public abstract String getCode(@NotNull final String basename); + @NotNull public abstract String getCode(@NotNull final String basename); } // class Pckg Modified: trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2008-01-17 21:13:16 UTC (rev 304) +++ trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2008-01-17 21:20:57 UTC (rev 305) @@ -30,6 +30,7 @@ import net.sf.aceunit.Suite; import org.junit.Test; import org.junit.Assert; +import org.jetbrains.annotations.NotNull; /** UnitTest for {@link Suite}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> @@ -46,6 +47,11 @@ public boolean containsTests() { return false; } + /** {@inheritDoc} */ + @NotNull + public String getCode(@NotNull final String basename) { + return ""; + } }; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-17 21:14:13
|
Revision: 304 http://aceunit.svn.sourceforge.net/aceunit/?rev=304&view=rev Author: christianhujer Date: 2008-01-17 13:13:16 -0800 (Thu, 17 Jan 2008) Log Message: ----------- [ 1873848 ] Framework should support fixture data Modified Paths: -------------- trunk/src/native/AceUnit.h trunk/src/native/AceUnitData.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2008-01-16 23:28:52 UTC (rev 303) +++ trunk/src/native/AceUnit.h 2008-01-17 21:13:16 UTC (rev 304) @@ -140,6 +140,12 @@ * <dd> * If you want AceUnit to execute code after every afterclass method, define this macro with that code. * </dd> + * <dt><code>ACEUNIT_RUNNERDATA_EXTENSION</code></dt> + * <dd> + * If you want to add additional data to the data available to the runner, define this macro. + * The macro should expand to valid fields in a structure. + * These fields will be inserted at the end of #AceUnitRunnerData_t. + * </dd> * </dl> * @author <a href="mailto:ch...@ri...">Christian Hujer</a> * @file AceUnit.h Modified: trunk/src/native/AceUnitData.h =================================================================== --- trunk/src/native/AceUnitData.h 2008-01-16 23:28:52 UTC (rev 303) +++ trunk/src/native/AceUnitData.h 2008-01-17 21:13:16 UTC (rev 304) @@ -61,6 +61,11 @@ /** The number of test cases that failed. */ uint16_t testCaseFailureCount; +#ifdef ACEUNIT_RUNNERDATA_EXTENSION + // Extension hook to add your own fields to AceUnitRunnerData_t. + ACEUNIT_RUNNERDATA_EXTENSION +#endif + } AceUnitRunnerData_t; /** The test execution information, used by the Runner and the Assertions. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-16 23:31:42
|
Revision: 303 http://aceunit.svn.sourceforge.net/aceunit/?rev=303&view=rev Author: christianhujer Date: 2008-01-16 15:28:52 -0800 (Wed, 16 Jan 2008) Log Message: ----------- Added project check. Currently checks against trailing whitespace. Added Paths: ----------- trunk/prjcheck Added: trunk/prjcheck =================================================================== --- trunk/prjcheck (rev 0) +++ trunk/prjcheck 2008-01-16 23:28:52 UTC (rev 303) @@ -0,0 +1,9 @@ +#!/bin/sh + +if find src -name "*.h" -or -name "*.c" -or -name "*.java" | xargs grep ' $' +then + echo Error, above files contain trailing whitespace. + exit 1 +else + exit 0 +fi Property changes on: trunk/prjcheck ___________________________________________________________________ Name: svn:executable + * 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...> - 2008-01-16 23:02:41
|
Revision: 302 http://aceunit.svn.sourceforge.net/aceunit/?rev=302&view=rev Author: christianhujer Date: 2008-01-16 14:46:51 -0800 (Wed, 16 Jan 2008) Log Message: ----------- Removed trailing whitespace. (Only occurred in copyright comment anyway) Modified Paths: -------------- trunk/src/doc/examples/sort/sort.h trunk/src/doc/examples/sort/sortTest.c trunk/src/java/src/prj/net/sf/aceunit/GenTest.java trunk/src/native/AceUnit.c trunk/src/native/AceUnit.h trunk/src/native/AceUnitAnnotations.h trunk/src/native/AceUnitData.c trunk/src/native/AceUnitData.h trunk/src/native/AceUnitLogging.h trunk/src/native/ExceptionHandling.c trunk/src/native/ExceptionHandling.h trunk/src/native/FullPlainLogger.c trunk/src/native/JUnitXmlLogger.c trunk/src/native/MiniRamLogger.c trunk/src/native/test/basic/AceUnitTest.c trunk/src/native/test/basicEmbedded/AceUnitTest.c trunk/src/native/test/comment/CommentTest.c trunk/src/native/test/longjmp/LongJmpTest.c trunk/src/native/test/recursive/C1/C1Mod1.c trunk/src/native/test/recursive/C1/C1Mod2.c trunk/src/native/test/recursive/C1/tests/Mod1/C1Mod1Test.c trunk/src/native/test/recursive/C1/tests/Mod2/C1Mod2Test.c trunk/src/native/test/recursive/TestMain.c trunk/src/native/test/twoFixtures/Fixture1.c trunk/src/native/test/twoFixtures/Fixture2.c trunk/src/native/test/twoFixtures/RunTest.c trunk/src/native/test/xmlLog/XmlLogTest.c Modified: trunk/src/doc/examples/sort/sort.h =================================================================== --- trunk/src/doc/examples/sort/sort.h 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/doc/examples/sort/sort.h 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/doc/examples/sort/sortTest.c =================================================================== --- trunk/src/doc/examples/sort/sortTest.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/doc/examples/sort/sortTest.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* Copyright (c) 2007 - 2008, Christian Hujer * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/AceUnit.c =================================================================== --- trunk/src/native/AceUnit.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/AceUnit.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/AceUnit.h 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/AceUnitAnnotations.h =================================================================== --- trunk/src/native/AceUnitAnnotations.h 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/AceUnitAnnotations.h 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/AceUnitData.c =================================================================== --- trunk/src/native/AceUnitData.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/AceUnitData.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/AceUnitData.h =================================================================== --- trunk/src/native/AceUnitData.h 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/AceUnitData.h 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/AceUnitLogging.h =================================================================== --- trunk/src/native/AceUnitLogging.h 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/AceUnitLogging.h 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/ExceptionHandling.c =================================================================== --- trunk/src/native/ExceptionHandling.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/ExceptionHandling.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/ExceptionHandling.h =================================================================== --- trunk/src/native/ExceptionHandling.h 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/ExceptionHandling.h 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/FullPlainLogger.c =================================================================== --- trunk/src/native/FullPlainLogger.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/FullPlainLogger.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/JUnitXmlLogger.c =================================================================== --- trunk/src/native/JUnitXmlLogger.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/JUnitXmlLogger.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/MiniRamLogger.c =================================================================== --- trunk/src/native/MiniRamLogger.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/MiniRamLogger.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/basic/AceUnitTest.c =================================================================== --- trunk/src/native/test/basic/AceUnitTest.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/basic/AceUnitTest.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/basicEmbedded/AceUnitTest.c =================================================================== --- trunk/src/native/test/basicEmbedded/AceUnitTest.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/basicEmbedded/AceUnitTest.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/comment/CommentTest.c =================================================================== --- trunk/src/native/test/comment/CommentTest.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/comment/CommentTest.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/longjmp/LongJmpTest.c =================================================================== --- trunk/src/native/test/longjmp/LongJmpTest.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/longjmp/LongJmpTest.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/recursive/C1/C1Mod1.c =================================================================== --- trunk/src/native/test/recursive/C1/C1Mod1.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/recursive/C1/C1Mod1.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/recursive/C1/C1Mod2.c =================================================================== --- trunk/src/native/test/recursive/C1/C1Mod2.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/recursive/C1/C1Mod2.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/recursive/C1/tests/Mod1/C1Mod1Test.c =================================================================== --- trunk/src/native/test/recursive/C1/tests/Mod1/C1Mod1Test.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/recursive/C1/tests/Mod1/C1Mod1Test.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/recursive/C1/tests/Mod2/C1Mod2Test.c =================================================================== --- trunk/src/native/test/recursive/C1/tests/Mod2/C1Mod2Test.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/recursive/C1/tests/Mod2/C1Mod2Test.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/recursive/TestMain.c =================================================================== --- trunk/src/native/test/recursive/TestMain.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/recursive/TestMain.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/twoFixtures/Fixture1.c =================================================================== --- trunk/src/native/test/twoFixtures/Fixture1.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/twoFixtures/Fixture1.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/twoFixtures/Fixture2.c =================================================================== --- trunk/src/native/test/twoFixtures/Fixture2.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/twoFixtures/Fixture2.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/twoFixtures/RunTest.c =================================================================== --- trunk/src/native/test/twoFixtures/RunTest.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/twoFixtures/RunTest.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 Modified: trunk/src/native/test/xmlLog/XmlLogTest.c =================================================================== --- trunk/src/native/test/xmlLog/XmlLogTest.c 2008-01-15 18:47:13 UTC (rev 301) +++ trunk/src/native/test/xmlLog/XmlLogTest.c 2008-01-16 22:46:51 UTC (rev 302) @@ -1,6 +1,6 @@ /* 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 @@ -11,7 +11,7 @@ * * 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-15 18:47:11
|
Revision: 301 http://aceunit.svn.sourceforge.net/aceunit/?rev=301&view=rev Author: christianhujer Date: 2008-01-15 10:47:13 -0800 (Tue, 15 Jan 2008) Log Message: ----------- Minor documentation fix. Modified Paths: -------------- trunk/src/native/AceUnit.h Modified: trunk/src/native/AceUnit.h =================================================================== --- trunk/src/native/AceUnit.h 2008-01-15 00:44:01 UTC (rev 300) +++ trunk/src/native/AceUnit.h 2008-01-15 18:47:13 UTC (rev 301) @@ -102,7 +102,7 @@ * </dd> * <dt><code>ACEUNIT_PRE_BEFORECLASS</code></dt> * <dd> - * If you want AceUnit to execute code prior to every beforeclass method, define this macro with that code. + * If you want AceUnit to execute code before every beforeclass method, define this macro with that code. * </dd> * <dt><code>ACEUNIT_POST_BEFORECLASS</code></dt> * <dd> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-15 00:44:03
|
Revision: 300 http://aceunit.svn.sourceforge.net/aceunit/?rev=300&view=rev Author: christianhujer Date: 2008-01-14 16:44:01 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Updated release version. Updated copyright. Modified Paths: -------------- trunk/src/doc/start.xhtml trunk/src/doc/transform.xslt Modified: trunk/src/doc/start.xhtml =================================================================== --- trunk/src/doc/start.xhtml 2008-01-15 00:24:31 UTC (rev 299) +++ trunk/src/doc/start.xhtml 2008-01-15 00:44:01 UTC (rev 300) @@ -20,7 +20,7 @@ </div> --> <p> - Latest release version: <strong>aceunit-0.4</strong> + Latest release version: <strong>aceunit-0.5</strong> </p> <h2>What is AceUnit?</h2> <!-- The description must match the project description at http://sourceforge.net/projects/aceunit/ --> Modified: trunk/src/doc/transform.xslt =================================================================== --- trunk/src/doc/transform.xslt 2008-01-15 00:24:31 UTC (rev 299) +++ trunk/src/doc/transform.xslt 2008-01-15 00:44:01 UTC (rev 300) @@ -59,7 +59,7 @@ </xsl:copy> <link rel="Stylesheet" type="text/css" href="sitestyle.css" /> <xsl:if test="not(/html:html/html:head/html:meta[name='Copyright']/@content)"> - <meta name="Copyright" content="Copyright © 2007 The AceUnit Developers. All Rights Reserved." /> + <meta name="Copyright" content="Copyright © 2007 - 2008 The AceUnit Developers. All Rights Reserved." /> </xsl:if> </xsl:template> @@ -79,7 +79,7 @@ <xsl:value-of select="/html:html/html:head/html:meta[name='Copyright']/@content" /> </xsl:when> <xsl:otherwise> - <xsl:text>Copyright © 2007 The AceUnit Developers. All Rights Reserved.</xsl:text> + <xsl:text>Copyright © 2007 - 2008 The AceUnit Developers. All Rights Reserved.</xsl:text> </xsl:otherwise> </xsl:choose> </address> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-15 00:24:32
|
Revision: 299 http://aceunit.svn.sourceforge.net/aceunit/?rev=299&view=rev Author: christianhujer Date: 2008-01-14 16:24:31 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Creating release tag 0.5 for branch 0.5. Added Paths: ----------- tags/0.5/ Copied: tags/0.5 (from rev 298, branches/0.5) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-15 00:23:01
|
Revision: 298 http://aceunit.svn.sourceforge.net/aceunit/?rev=298&view=rev Author: christianhujer Date: 2008-01-14 16:23:05 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Creating branch for 0.5. Added Paths: ----------- branches/0.5/ Copied: branches/0.5 (from rev 297, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-15 00:14:22
|
Revision: 297 http://aceunit.svn.sourceforge.net/aceunit/?rev=297&view=rev Author: christianhujer Date: 2008-01-14 16:14:17 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Pulled method prototype of getCode() in Fixture and Pckg up into Suite. Improved documentation. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/java/src/prj/net/sf/aceunit/Pckg.java trunk/src/java/src/prj/net/sf/aceunit/Suite.java Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-15 00:11:16 UTC (rev 296) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-15 00:14:17 UTC (rev 297) @@ -98,10 +98,7 @@ return testMethods.size() > 0; } - /** 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. - */ + /** {@inheritDoc} */ public String getCode(@NotNull final String basename) { final Formatter out = new Formatter(); out.format("/** AceUnit test header file for fixture %s.%n", basename); Modified: trunk/src/java/src/prj/net/sf/aceunit/Pckg.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2008-01-15 00:11:16 UTC (rev 296) +++ trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2008-01-15 00:14:17 UTC (rev 297) @@ -40,8 +40,8 @@ /** The list of suites found. */ @NotNull private final List<Suite> suites = new ArrayList<Suite>(); - /** Creates a Suite with the specified id. - * @param id The id for this Suite. + /** Creates a Pckg with the specified id. + * @param id The id for this Pckg. */ public Pckg(final int id) { super(id); @@ -56,17 +56,14 @@ return containsTests; } - /** Adds a Suite to this Suite. + /** Adds a Suite to this Pckg. * @param suite Suite to add */ public void addSuite(@NotNull final Suite suite) { suites.add(suite); } - /** Returns a String repsuites.size() > 0;C-Source code for this Suite. - * @param basename Base name of this Suite. - * @return String with the C-Source for this Suite. - */ + /** {@inheritDoc} */ public String getCode(@NotNull final String basename) { final Formatter out = new Formatter(); out.format("/** AceUnit test header file for suite %s.%n", basename); Modified: trunk/src/java/src/prj/net/sf/aceunit/Suite.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-15 00:11:16 UTC (rev 296) +++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-15 00:14:17 UTC (rev 297) @@ -27,6 +27,8 @@ package net.sf.aceunit; +import org.jetbrains.annotations.NotNull; + /** A Suite is a collection of Test Cases. * A Suite can either be a Fixture that really contains Test Cases, * or a Pckg which is a Suite that contains other Suites. @@ -56,4 +58,10 @@ */ public abstract boolean containsTests(); + /** Returns a String repsuites.size() > 0;C-Source code for this Suite. + * @param basename Base name of this Suite. + * @return String with the C-Source for this Suite. + */ + public abstract String getCode(@NotNull final String basename); + } // class Pckg This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-15 00:11:16
|
Revision: 296 http://aceunit.svn.sourceforge.net/aceunit/?rev=296&view=rev Author: christianhujer Date: 2008-01-14 16:11:16 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Added test case for Pckg#addSuite(Suite). Modified Paths: -------------- trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java Modified: trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2008-01-14 23:55:23 UTC (rev 295) +++ trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2008-01-15 00:11:16 UTC (rev 296) @@ -29,6 +29,9 @@ import net.sf.aceunit.Pckg; import net.sf.aceunit.Suite; +import net.sf.aceunit.Fixture; +import org.junit.Test; +import org.junit.Assert; /** Unit Test for {@link Pckg}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> @@ -40,4 +43,20 @@ return new Pckg(id); } + /** Tests that {@link Pckg#addSuite(Suite)} works. */ + @Test + public void testAdd() { + final Pckg testling = new Pckg(1); + Assert.assertFalse("After creation, a package is empty.", testling.containsTests()); + final Pckg pckg = new Pckg(2); + testling.addSuite(pckg); + Assert.assertFalse("After adding an empty package, a package is still empty.", testling.containsTests()); + final Fixture emptyFixture = new Fixture(3, ""); + pckg.addSuite(emptyFixture); + Assert.assertFalse("After adding a fixture with no test cases, a package is still empty.", testling.containsTests()); + final Fixture fixture = new Fixture(3, "A_Test void aTest() {\n}\n"); + pckg.addSuite(fixture); + Assert.assertTrue("After adding a fixture with test cases, a package is no longer empty.", testling.containsTests()); + } + } // class SuiteTest This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-14 23:55:22
|
Revision: 295 http://aceunit.svn.sourceforge.net/aceunit/?rev=295&view=rev Author: christianhujer Date: 2008-01-14 15:55:23 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Clarified ID generation system. Extracted it into a separate class and added unit test. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/java/src/prj/net/sf/aceunit/GenTest.java Added Paths: ----------- trunk/src/java/src/prj/net/sf/aceunit/IdGenerator.java trunk/src/java/src/tst/test/net/sf/aceunit/IdGeneratorTest.java Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-14 22:16:06 UTC (rev 294) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-14 23:55:23 UTC (rev 295) @@ -35,6 +35,8 @@ import org.jetbrains.annotations.NotNull; /** The Fixture represents a single test fixture along with all its methods. + * It is intentional that the Ids of the test methods are not globally unique. + * Globally unique test method ids would lead to changes in fixtures if the number of test cases in previously scanned fixtures changes. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class Fixture extends Suite { Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-14 22:16:06 UTC (rev 294) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-14 23:55:23 UTC (rev 295) @@ -54,8 +54,10 @@ /** Whether to overwrite write-protected files. */ private boolean force; - /** The last used id for suites. */ - private int lastSuiteId; + /** The IdGenerator which is used for generating unique ids for Suites. + * It is used for all {@link Suite}s ({@link Pckg}s and {@link Fixture}s). + */ + @NotNull private final IdGenerator idGenerator = new IdGenerator(); /** Creates a GenTest instance. * @throws IOException in case of I/O problems. @@ -63,13 +65,6 @@ public GenTest() throws IOException { } - /** Returns the next id for suites. - * @return The next id for suites. - */ - public int getNextSuiteId() { - return ++lastSuiteId; - } - /** Sets whether overwriting of existing files should be enforced. * @param force Whether overwriting of existing files should be enforced. */ @@ -144,7 +139,7 @@ */ private boolean performFixture(@NotNull final File base, @NotNull final File fixtureFile) throws IOException { final String fixtureName = fixtureFile.getName().replaceAll("\\.c$", ""); - final Fixture fixture = new Fixture(getNextSuiteId(), fixtureFile); + final Fixture fixture = new Fixture(idGenerator.getNextId(), fixtureFile); final boolean containedFixture = fixture.containsTests(); if (containedFixture) { final File hFile = new File(fixtureFile.getParent(), fixtureName + ".h"); Added: trunk/src/java/src/prj/net/sf/aceunit/IdGenerator.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/IdGenerator.java (rev 0) +++ trunk/src/java/src/prj/net/sf/aceunit/IdGenerator.java 2008-01-14 23:55:23 UTC (rev 295) @@ -0,0 +1,32 @@ +package net.sf.aceunit; + +/** Generator for consecutive Ids. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class IdGenerator { + + /** The last used id. */ + private int lastId; + + /** Creates an IdGenerator. + * The {@link #lastId} will be 0 which means the id returned by {@link #getNextId()} will be 1. + */ + public IdGenerator() { + this(0); + } + + /** Creates an IdGenerator. + * @param lastId Last id used, {@link #getNextId()} will return that value + 1. + */ + public IdGenerator(final int lastId) { + this.lastId = lastId; + } + + /** Returns the next id. + * @return The next id. + */ + public int getNextId() { + return ++lastId; + } + +} // class IdGenerator Property changes on: trunk/src/java/src/prj/net/sf/aceunit/IdGenerator.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Added: trunk/src/java/src/tst/test/net/sf/aceunit/IdGeneratorTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/IdGeneratorTest.java (rev 0) +++ trunk/src/java/src/tst/test/net/sf/aceunit/IdGeneratorTest.java 2008-01-14 23:55:23 UTC (rev 295) @@ -0,0 +1,19 @@ +package test.net.sf.aceunit; + +import net.sf.aceunit.IdGenerator; +import org.junit.Test; +import org.junit.Assert; + +/** UnitTest for {@link IdGenerator}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class IdGeneratorTest { + + /** Tests that IdGenerator returns distinct ids. */ + @Test + public void testDistinct() { + final IdGenerator testling = new IdGenerator(); + Assert.assertFalse("IdGenerator MUST return distinct ids.", testling.getNextId() == testling.getNextId()); + } + +} // class IdGeneratorTest Property changes on: trunk/src/java/src/tst/test/net/sf/aceunit/IdGeneratorTest.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...> - 2008-01-14 22:16:14
|
Revision: 294 http://aceunit.svn.sourceforge.net/aceunit/?rev=294&view=rev Author: christianhujer Date: 2008-01-14 14:16:06 -0800 (Mon, 14 Jan 2008) Log Message: ----------- Improved test cases for Suite / Pckg / Fixture. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-14 00:08:20 UTC (rev 293) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-14 22:16:06 UTC (rev 294) @@ -69,8 +69,16 @@ * @throws IOException In case of I/O problems. */ public Fixture(final int id, @NotNull final File file) throws IOException { + this(id, SourceFiles.readSourceWithoutComments(file)); + } + + /** Creates a Fixture with the specified id. + * @param id The id of this Fixture. + * @param sourceCode C source code for this fixture. + */ + public Fixture(final int id, @NotNull final String sourceCode) { super(id); - findMethods(SourceFiles.readSourceWithoutComments(file)); + findMethods(sourceCode); } /** Finds all methods of all method lists in the specified source. Modified: trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java 2008-01-14 00:08:20 UTC (rev 293) +++ trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java 2008-01-14 22:16:06 UTC (rev 294) @@ -27,15 +27,16 @@ package test.net.sf.aceunit; -import org.junit.Test; import net.sf.aceunit.Fixture; /** Unit Test for {@link Fixture}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public class FixtureTest { +public class FixtureTest extends SuiteTest { - @Test - public void testDummy() {} + /** {@inheritDoc} */ + public Fixture createSuite(final int id) { + return new Fixture(id, ""); + } } // class MethodListsTest Modified: trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2008-01-14 00:08:20 UTC (rev 293) +++ trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2008-01-14 22:16:06 UTC (rev 294) @@ -29,18 +29,15 @@ import net.sf.aceunit.Pckg; import net.sf.aceunit.Suite; -import org.junit.Test; -import org.junit.Assert; /** Unit Test for {@link Pckg}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ -public class PckgTest { +public class PckgTest extends SuiteTest { - /** Tests that a Suite stores its id when created. */ - @Test public void testId() { - final Suite pckg = new Pckg(10); - Assert.assertEquals("Id must be stored.", 10, pckg.getId()); + /** {@inheritDoc} */ + public Suite createSuite(final int id) { + return new Pckg(id); } } // class SuiteTest Modified: trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2008-01-14 00:08:20 UTC (rev 293) +++ trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2008-01-14 22:16:06 UTC (rev 294) @@ -36,15 +36,23 @@ */ public class SuiteTest { - /** Tests that ids are stored properly. */ - @Test - public void testId() { - final Suite suite = new Suite(10) { + /** Creates a Suite with the specified id. + * @param id Id to use for the Suite. + * @return Suite with the specified id. + */ + public Suite createSuite(final int id) { + return new Suite(10) { /** {@inheritDoc} */ public boolean containsTests() { return false; } }; + } + + /** Tests that ids are stored properly. */ + @Test + public void testId() { + final Suite suite = createSuite(10); Assert.assertEquals("Id must be stored properly.", 10, suite.getId()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-14 00:08:16
|
Revision: 293 http://aceunit.svn.sourceforge.net/aceunit/?rev=293&view=rev Author: christianhujer Date: 2008-01-13 16:08:20 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Added missing copyright comments. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java trunk/src/java/src/prj/net/sf/aceunit/Suite.java trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-14 00:07:55 UTC (rev 292) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-14 00:08:20 UTC (rev 293) @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, Christian Hujer +/* Copyright (c) 2007 - 2008, Christian Hujer * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2008-01-14 00:07:55 UTC (rev 292) +++ trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2008-01-14 00:08:20 UTC (rev 293) @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, Christian Hujer +/* Copyright (c) 2007 - 2008, Christian Hujer * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: trunk/src/java/src/prj/net/sf/aceunit/Suite.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-14 00:07:55 UTC (rev 292) +++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-14 00:08:20 UTC (rev 293) @@ -1,3 +1,30 @@ +/* Copyright (c) 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + package net.sf.aceunit; /** A Suite is a collection of Test Cases. Modified: trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java 2008-01-14 00:07:55 UTC (rev 292) +++ trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java 2008-01-14 00:08:20 UTC (rev 293) @@ -1,3 +1,30 @@ +/* Copyright (c) 2007 - 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + package test.net.sf.aceunit; import org.junit.Test; Modified: trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2008-01-14 00:07:55 UTC (rev 292) +++ trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2008-01-14 00:08:20 UTC (rev 293) @@ -1,3 +1,30 @@ +/* Copyright (c) 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + package test.net.sf.aceunit; import net.sf.aceunit.Pckg; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-14 00:08:08
|
Revision: 292 http://aceunit.svn.sourceforge.net/aceunit/?rev=292&view=rev Author: christianhujer Date: 2008-01-13 16:07:55 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Added UnitTest for Suite. Added Paths: ----------- trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java Added: trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java (rev 0) +++ trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2008-01-14 00:07:55 UTC (rev 292) @@ -0,0 +1,51 @@ +/* Copyright (c) 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package test.net.sf.aceunit; + +import net.sf.aceunit.Suite; +import org.junit.Test; +import org.junit.Assert; + +/** UnitTest for {@link Suite}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class SuiteTest { + + /** Tests that ids are stored properly. */ + @Test + public void testId() { + final Suite suite = new Suite(10) { + /** {@inheritDoc} */ + public boolean containsTests() { + return false; + } + }; + Assert.assertEquals("Id must be stored properly.", 10, suite.getId()); + } + +} // class SuiteTest Property changes on: trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.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...> - 2008-01-13 17:57:18
|
Revision: 291 http://aceunit.svn.sourceforge.net/aceunit/?rev=291&view=rev Author: christianhujer Date: 2008-01-13 09:57:13 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Renamed Suite to Pckg. Extracted common superclass. (partial commit) Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/java/src/prj/net/sf/aceunit/GenTest.java trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java Added Paths: ----------- trunk/src/java/src/prj/net/sf/aceunit/Pckg.java trunk/src/java/src/prj/net/sf/aceunit/Suite.java trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java Removed Paths: ------------- trunk/src/java/src/prj/net/sf/aceunit/Suite.java trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-13 17:47:18 UTC (rev 290) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-13 17:57:13 UTC (rev 291) @@ -73,11 +73,6 @@ findMethods(SourceFiles.readSourceWithoutComments(file)); } - /** {@inheritDoc} */ - public void addSuite(@NotNull final Suite suite) { - throw new RuntimeException("You must not add a Suite to a Fixture."); - } - /** Finds all methods of all method lists in the specified source. * @param cSource C source to search. */ @@ -97,7 +92,7 @@ * @param basename Base name of the fixture. * @return String with the C-Source for the fixture. */ - public String getFixtureCode(@NotNull final String basename) { + public String getCode(@NotNull final String basename) { final Formatter out = new Formatter(); out.format("/** AceUnit test header file for fixture %s.%n", basename); out.format(" *%n"); Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:47:18 UTC (rev 290) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:57:13 UTC (rev 291) @@ -120,17 +120,17 @@ /** Performs the generation of tests for a package. * @param base Base directory of the tree, required to determine what part of the path is package. - * @param pckg Directory to treat as package. + * @param pckgDir Directory to treat as package. * @return <code>true</code> if the package tree contained a fixture, otherwise <code>false</code> * @throws IOException In case of I/O problems. */ - private boolean performPckg(@NotNull final File base, @NotNull final File pckg) throws IOException { - assert pckg.isDirectory(); + private boolean performPckg(@NotNull final File base, @NotNull final File pckgDir) throws IOException { + assert pckgDir.isDirectory(); boolean containedFixture = false; - for (final File dir : pckg.listFiles(SourceFiles.DIR_FILTER)) { + for (final File dir : pckgDir.listFiles(SourceFiles.DIR_FILTER)) { containedFixture |= performPckg(base, dir); } - for (final File fixtureFile : pckg.listFiles(SourceFiles.C_SOURCE_FILTER)) { + for (final File fixtureFile : pckgDir.listFiles(SourceFiles.C_SOURCE_FILTER)) { containedFixture |= performFixture(base, fixtureFile); } return containedFixture; @@ -148,7 +148,7 @@ final boolean containedFixture = fixture.containsTests(); if (containedFixture) { final File hFile = new File(fixtureFile.getParent(), fixtureName + ".h"); - final String hSource = fixture.getFixtureCode(fixtureName); + final String hSource = fixture.getCode(fixtureName); SourceFiles.writeIfChanged(hFile, hSource, force); } return containedFixture; Copied: trunk/src/java/src/prj/net/sf/aceunit/Pckg.java (from rev 290, trunk/src/java/src/prj/net/sf/aceunit/Suite.java) =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Pckg.java (rev 0) +++ trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2008-01-13 17:57:13 UTC (rev 291) @@ -0,0 +1,95 @@ +/* Copyright (c) 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.sf.aceunit; + +import org.jetbrains.annotations.NotNull; +import java.util.Formatter; +import java.util.ArrayList; +import java.util.List; + +/** A Pckg is a Suite that contains other Suites. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class Pckg extends Suite { + + /** The list of suites found. */ + @NotNull private final List<Suite> suites = new ArrayList<Suite>(); + + /** Creates a Suite with the specified id. + * @param id The id for this Suite. + */ + public Pckg(final int id) { + super(id); + } + + /** {@inheritDoc} */ + public boolean containsTests() { + boolean containsTests = false; + for (final Suite suite : suites) { + containsTests = containsTests || suite.containsTests(); + } + return containsTests; + } + + /** Adds a Suite to this Suite. + * @param suite Suite to add + */ + public void addSuite(@NotNull final Suite suite) { + suites.add(suite); + } + + /** Returns a String repsuites.size() > 0;C-Source code for this Suite. + * @param basename Base name of this Suite. + * @return String with the C-Source for this Suite. + */ + public String getCode(@NotNull final String basename) { + final Formatter out = new Formatter(); + out.format("/** AceUnit test header file for suite %s.%n", basename); + 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"); + out.format("const TestSuite_t *suites = {%n"); + for (final Suite suite : suites) { + out.format(" suite%d,%n", suite.getId()); + } + out.format("};%n"); + out.format("%n"); + out.format("const TestSuite_t suite%d = {%n", getId()); + out.format("#ifdef ACEUNIT_EMBEDDED%n"); + out.format(" %d,%n", getId()); + out.format("#else%n"); + out.format(" \"%s\",%n", basename); + out.format("#endif%n"); + out.format(" suites%n"); + out.format("};%n"); + return out.toString(); + } + +} // class Suite Property changes on: trunk/src/java/src/prj/net/sf/aceunit/Pckg.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Deleted: trunk/src/java/src/prj/net/sf/aceunit/Suite.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-13 17:47:18 UTC (rev 290) +++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-13 17:57:13 UTC (rev 291) @@ -1,108 +0,0 @@ -/* Copyright (c) 2008, Christian Hujer - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the AceUnit developers nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package net.sf.aceunit; - -import org.jetbrains.annotations.NotNull; -import java.io.File; -import java.util.Formatter; -import java.util.ArrayList; -import java.util.List; - -/** The Suite represents a Suite with all its Suites. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public class Suite { - - /** The id of this Suite. */ - private final int id; - - /** The list of suites found. */ - @NotNull private final List<Suite> suites = new ArrayList<Suite>(); - - /** Creates a Suite with the specified id. - * @param id The id for this Suite. - */ - public Suite(final int id) { - this.id = id; - } - - /** Returns the id of this Suite. - * @return The id of this Suite. - */ - public int getId() { - return id; - } - - /** Returns whether this suite contains tests. - * @return <code>true</code> if this fiture contains test cases, otherwise <code>false</code>. - */ - public boolean containsTests() { - boolean containsTests = false; - for (final Suite suite : suites) { - containsTests = containsTests || suite.containsTests(); - } - return containsTests; - } - - /** Adds a Suite to this Suite. - * @param suite Suite to add - */ - public void addSuite(@NotNull final Suite suite) { - suites.add(suite); - } - - /** Returns a String representing the C-Source code for this Suite. - * @param basename Base name of this Suite. - * @return String with the C-Source for this Suite. - */ - public String getSuiteCode(@NotNull final String basename) { - final Formatter out = new Formatter(); - out.format("/** AceUnit test header file for suite %s.%n", basename); - 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"); - out.format("const TestSuite_t *suites = {%n"); - for (final Suite suite : suites) { - out.format(" suite%d,%n", suite.getId()); - } - out.format("};%n"); - out.format("%n"); - out.format("const TestSuite_t suite%d = {%n", getId()); - out.format("#ifdef ACEUNIT_EMBEDDED%n"); - out.format(" %d,%n", getId()); - out.format("#else%n"); - out.format(" \"%s\",%n", basename); - out.format("#endif%n"); - out.format(" suites%n"); - out.format("};%n"); - return out.toString(); - } - -} // class Suite Added: trunk/src/java/src/prj/net/sf/aceunit/Suite.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Suite.java (rev 0) +++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-13 17:57:13 UTC (rev 291) @@ -0,0 +1,32 @@ +package net.sf.aceunit; + +/** A Suite is a collection of Test Cases. + * A Suite can either be a Fixture that really contains Test Cases, + * or a Pckg which is a Suite that contains other Suites. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public abstract class Suite { + + /** The id of this Suite. */ + private final int id; + + /** Creates a Suite. + * @param id Id for this Suite. + */ + protected Suite(final int id) { + this.id = id; + } + + /** Returns the id of this Suite. + * @return The id of this Suite. + */ + public int getId() { + return id; + } + + /** Returns whether this suite contains tests. + * @return <code>true</code> if this fiture contains test cases, otherwise <code>false</code>. + */ + public abstract boolean containsTests(); + +} // class Pckg Property changes on: trunk/src/java/src/prj/net/sf/aceunit/Suite.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Modified: trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java 2008-01-13 17:47:18 UTC (rev 290) +++ trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java 2008-01-13 17:57:13 UTC (rev 291) @@ -1,8 +1,9 @@ package test.net.sf.aceunit; import org.junit.Test; +import net.sf.aceunit.Fixture; -/** Unit Test for {@link net.sf.aceunit.Fixture}. +/** Unit Test for {@link Fixture}. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public class FixtureTest { Copied: trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java (from rev 281, trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java) =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java (rev 0) +++ trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2008-01-13 17:57:13 UTC (rev 291) @@ -0,0 +1,19 @@ +package test.net.sf.aceunit; + +import net.sf.aceunit.Pckg; +import net.sf.aceunit.Suite; +import org.junit.Test; +import org.junit.Assert; + +/** Unit Test for {@link Pckg}. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public class PckgTest { + + /** Tests that a Suite stores its id when created. */ + @Test public void testId() { + final Suite pckg = new Pckg(10); + Assert.assertEquals("Id must be stored.", 10, pckg.getId()); + } + +} // class SuiteTest Property changes on: trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Deleted: trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java =================================================================== --- trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2008-01-13 17:47:18 UTC (rev 290) +++ trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2008-01-13 17:57:13 UTC (rev 291) @@ -1,18 +0,0 @@ -package test.net.sf.aceunit; - -import net.sf.aceunit.Suite; -import org.junit.Test; -import org.junit.Assert; - -/** Unit Test for {@link Suite}. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public class SuiteTest { - - /** Tests that a Suite stores its id when created. */ - @Test public void testId() { - final Suite suite = new Suite(10); - Assert.assertEquals("Id must be stored.", 10, suite.getId()); - } - -} // class SuiteTest This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-13 17:47:24
|
Revision: 290 http://aceunit.svn.sourceforge.net/aceunit/?rev=290&view=rev Author: christianhujer Date: 2008-01-13 09:47:18 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Delegated knowledge about contained tests. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/java/src/prj/net/sf/aceunit/GenTest.java trunk/src/java/src/prj/net/sf/aceunit/Suite.java Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-13 17:32:03 UTC (rev 289) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-13 17:47:18 UTC (rev 290) @@ -28,9 +28,10 @@ package net.sf.aceunit; import java.util.Arrays; -import java.util.Collection; import java.util.Formatter; import java.util.List; +import java.io.File; +import java.io.IOException; import org.jetbrains.annotations.NotNull; /** The Fixture represents a single test fixture along with all its methods. @@ -62,31 +63,33 @@ /** All method lists for used methods for easy iteration. */ private final List<MethodList> usedMethodLists = Arrays.asList(testMethods, beforeMethods, afterMethods, beforeClassMethods, afterClassMethods); - /** Creatse a Fixture with the specified id. + /** Creates a Fixture with the specified id. * @param id The id of this Fixture. + * @param file File to create fixture for. + * @throws IOException In case of I/O problems. */ - public Fixture(final int id) { + public Fixture(final int id, @NotNull final File file) throws IOException { super(id); + findMethods(SourceFiles.readSourceWithoutComments(file)); } - /** Returns an unmodifiable view of all method lists. - * @return All method lists. - */ - public Collection<MethodList> getMethodLists() { - return methodLists; + /** {@inheritDoc} */ + public void addSuite(@NotNull final Suite suite) { + throw new RuntimeException("You must not add a Suite to a Fixture."); } /** Finds all methods of all method lists in the specified source. * @param cSource C source to search. - * @return Whether methods were found. - * @retval true if the fixture contains at least one test case. - * @retval false if the fixture contains zero test cases. */ - public boolean findMethods(@NotNull final String cSource) { + private void findMethods(@NotNull final String cSource) { for (final MethodList methodList : methodLists) { methodList.findMethods(cSource); } testMethods.removeAll(ignoreMethods); + } + + /** {@inheritDoc} */ + public boolean containsTests() { return testMethods.size() > 0; } Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:32:03 UTC (rev 289) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:47:18 UTC (rev 290) @@ -144,9 +144,8 @@ */ private boolean performFixture(@NotNull final File base, @NotNull final File fixtureFile) throws IOException { final String fixtureName = fixtureFile.getName().replaceAll("\\.c$", ""); - final String cSource = SourceFiles.readSourceWithoutComments(fixtureFile); - final Fixture fixture = new Fixture(getNextSuiteId()); - final boolean containedFixture = fixture.findMethods(cSource); + final Fixture fixture = new Fixture(getNextSuiteId(), fixtureFile); + final boolean containedFixture = fixture.containsTests(); if (containedFixture) { final File hFile = new File(fixtureFile.getParent(), fixtureName + ".h"); final String hSource = fixture.getFixtureCode(fixtureName); Modified: trunk/src/java/src/prj/net/sf/aceunit/Suite.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-13 17:32:03 UTC (rev 289) +++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-13 17:47:18 UTC (rev 290) @@ -58,6 +58,24 @@ return id; } + /** Returns whether this suite contains tests. + * @return <code>true</code> if this fiture contains test cases, otherwise <code>false</code>. + */ + public boolean containsTests() { + boolean containsTests = false; + for (final Suite suite : suites) { + containsTests = containsTests || suite.containsTests(); + } + return containsTests; + } + + /** Adds a Suite to this Suite. + * @param suite Suite to add + */ + public void addSuite(@NotNull final Suite suite) { + suites.add(suite); + } + /** Returns a String representing the C-Source code for this Suite. * @param basename Base name of this Suite. * @return String with the C-Source for this Suite. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-13 17:32:17
|
Revision: 289 http://aceunit.svn.sourceforge.net/aceunit/?rev=289&view=rev Author: christianhujer Date: 2008-01-13 09:32:03 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Improved source layout. Made symbols public if they should be. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java Modified: trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2008-01-13 17:30:31 UTC (rev 288) +++ trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2008-01-13 17:32:03 UTC (rev 289) @@ -40,15 +40,18 @@ * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public abstract class SourceFiles { + /** FileFilter to get directories. */ - static final FileFilter DIR_FILTER = new FileFilter() { + public static final FileFilter DIR_FILTER = new FileFilter() { /** {@inheritDoc} */ public boolean accept(@NotNull final File pathname) { return pathname.isDirectory(); } }; + /** FileFilter to get C source files. */ - static final FileFilter C_SOURCE_FILTER = new FileFilter() { + public static final FileFilter C_SOURCE_FILTER = new FileFilter() { + /** {@inheritDoc} */ public boolean accept(final File pathname) { return pathname.isFile() && pathname.getName().endsWith(".c"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-13 17:30:30
|
Revision: 288 http://aceunit.svn.sourceforge.net/aceunit/?rev=288&view=rev Author: christianhujer Date: 2008-01-13 09:30:31 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Moved FileFilters from GenTest to SourceFiles. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:29:28 UTC (rev 287) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:30:31 UTC (rev 288) @@ -28,7 +28,6 @@ package net.sf.aceunit; import java.io.File; -import java.io.FileFilter; import java.io.IOException; import java.util.List; import net.sf.japi.io.args.ArgParser; @@ -43,21 +42,6 @@ */ public class GenTest extends BasicCommand { - /** FileFilter to get directories. */ - private static final FileFilter DIR_FILTER = new FileFilter() { - /** {@inheritDoc} */ - public boolean accept(@NotNull final File pathname) { - return pathname.isDirectory(); - } - }; - - /** FileFilter to get C source files. */ - private static final FileFilter C_SOURCE_FILTER = new FileFilter() { - public boolean accept(final File pathname) { - return pathname.isFile() && pathname.getName().endsWith(".c"); - } - }; - /** Main program. * @param args Currently the first argument must be the base name of the file to create a fixture for, e.g. "example", without file ending. * @note the interface is subject of change. @@ -143,10 +127,10 @@ private boolean performPckg(@NotNull final File base, @NotNull final File pckg) throws IOException { assert pckg.isDirectory(); boolean containedFixture = false; - for (final File dir : pckg.listFiles(DIR_FILTER)) { + for (final File dir : pckg.listFiles(SourceFiles.DIR_FILTER)) { containedFixture |= performPckg(base, dir); } - for (final File fixtureFile : pckg.listFiles(C_SOURCE_FILTER)) { + for (final File fixtureFile : pckg.listFiles(SourceFiles.C_SOURCE_FILTER)) { containedFixture |= performFixture(base, fixtureFile); } return containedFixture; Modified: trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2008-01-13 17:29:28 UTC (rev 287) +++ trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2008-01-13 17:30:31 UTC (rev 288) @@ -34,11 +34,25 @@ import java.io.FileReader; import java.io.PrintWriter; import java.io.FileWriter; +import java.io.FileFilter; /** Utility class with methods for reading source files. * @author <a href="mailto:ch...@ri...">Christian Hujer</a> */ public abstract class SourceFiles { + /** FileFilter to get directories. */ + static final FileFilter DIR_FILTER = new FileFilter() { + /** {@inheritDoc} */ + public boolean accept(@NotNull final File pathname) { + return pathname.isDirectory(); + } + }; + /** FileFilter to get C source files. */ + static final FileFilter C_SOURCE_FILTER = new FileFilter() { + public boolean accept(final File pathname) { + return pathname.isFile() && pathname.getName().endsWith(".c"); + } + }; /** Utility class - do not instanciate. */ private SourceFiles() {} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-13 17:29:26
|
Revision: 287 http://aceunit.svn.sourceforge.net/aceunit/?rev=287&view=rev Author: christianhujer Date: 2008-01-13 09:29:28 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Removed findSuites(). Will not be needed here, will be implemented in GenTest instead. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Suite.java Modified: trunk/src/java/src/prj/net/sf/aceunit/Suite.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-13 17:25:38 UTC (rev 286) +++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2008-01-13 17:29:28 UTC (rev 287) @@ -58,15 +58,6 @@ return id; } - /** Finds all Suites in the specified file or directory. - * @param file File to search. - * @return <code>true</code> if Suites were found, otherwise <code>false</code>. - */ - public boolean findSuites(@NotNull final File file) { - // TODO - return false; - } - /** Returns a String representing the C-Source code for this Suite. * @param basename Base name of this Suite. * @return String with the C-Source for this Suite. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-13 17:25:38
|
Revision: 286 http://aceunit.svn.sourceforge.net/aceunit/?rev=286&view=rev Author: christianhujer Date: 2008-01-13 09:25:38 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Renamed SourceReading to SourceFiles. Moved another utility method to SourceFiles. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java Added Paths: ----------- trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java Removed Paths: ------------- trunk/src/java/src/prj/net/sf/aceunit/SourceReading.java Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:22:26 UTC (rev 285) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:25:38 UTC (rev 286) @@ -29,9 +29,7 @@ import java.io.File; import java.io.FileFilter; -import java.io.FileWriter; import java.io.IOException; -import java.io.PrintWriter; import java.util.List; import net.sf.japi.io.args.ArgParser; import net.sf.japi.io.args.BasicCommand; @@ -154,25 +152,6 @@ return containedFixture; } - /** Writes a String to a file if the String differs from the file's content. - * @param file File to write to. - * @param text String to write to the file. - * @throws IOException In case of I/O problems. - */ - void writeIfChanged(@NotNull final File file, @NotNull final String text) throws IOException { - if (!file.exists() || !text.equals(SourceReading.readSource(file))) { - if (force) { - file.setWritable(true); - } - final PrintWriter out = new PrintWriter(new FileWriter(file)); - try { - out.append(text); - } finally { - out.close(); - } - } - } - /** Performs the generation of tests for a fixtureFile. * @param base Base directory of the tree, required to determine what part of the path is package. * @param fixtureFile File that contains the fixtureFile. @@ -181,13 +160,13 @@ */ private boolean performFixture(@NotNull final File base, @NotNull final File fixtureFile) throws IOException { final String fixtureName = fixtureFile.getName().replaceAll("\\.c$", ""); - final String cSource = SourceReading.readSourceWithoutComments(fixtureFile); + final String cSource = SourceFiles.readSourceWithoutComments(fixtureFile); final Fixture fixture = new Fixture(getNextSuiteId()); final boolean containedFixture = fixture.findMethods(cSource); if (containedFixture) { final File hFile = new File(fixtureFile.getParent(), fixtureName + ".h"); final String hSource = fixture.getFixtureCode(fixtureName); - writeIfChanged(hFile, hSource); + SourceFiles.writeIfChanged(hFile, hSource, force); } return containedFixture; } Copied: trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java (from rev 285, trunk/src/java/src/prj/net/sf/aceunit/SourceReading.java) =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java (rev 0) +++ trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2008-01-13 17:25:38 UTC (rev 286) @@ -0,0 +1,98 @@ +/* Copyright (c) 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.sf.aceunit; + +import org.jetbrains.annotations.NotNull; +import java.io.File; +import java.io.IOException; +import java.io.Reader; +import java.io.FileReader; +import java.io.PrintWriter; +import java.io.FileWriter; + +/** Utility class with methods for reading source files. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public abstract class SourceFiles { + + /** Utility class - do not instanciate. */ + private SourceFiles() {} + + /** Reads a source file. + * @param file File of the source to read. + * @return String with the contents of the specified file. + * @throws java.io.IOException in case of I/O problems. + */ + public static String readSource(@NotNull final File file) throws IOException { + final Reader in = new FileReader(file); + final StringBuilder sb = new StringBuilder(); + final char[] buf = new char[4096]; + for (int charsRead; (charsRead = in.read(buf)) != -1;) { + sb.append(buf, 0, charsRead); + } + in.close(); + return sb.toString(); + } + + /** Reads a source file without comments. + * @param file File of the source to read. + * @return String with the contents of the specified file. + * @throws java.io.IOException in case of I/O problems. + */ + public static String readSourceWithoutComments(@NotNull final File file) throws IOException { + final Reader in = new CommentToWhitespaceReader(new FileReader(file)); + final StringBuilder sb = new StringBuilder(); + final char[] buf = new char[4096]; + for (int charsRead; (charsRead = in.read(buf)) != -1;) { + sb.append(buf, 0, charsRead); + } + in.close(); + return sb.toString(); + } + + /** Writes a String to a file if the String differs from the file's content. + * @param file File to write to. + * @param text String to write to the file. + * @param force Set this to true if a write protection from the file should be removed. + * @throws java.io.IOException In case of I/O problems. + */ + public static void writeIfChanged(@NotNull final File file, @NotNull final String text, final boolean force) throws IOException { + if (!file.exists() || !text.equals(readSource(file))) { + if (force) { + file.setWritable(true); + } + final PrintWriter out = new PrintWriter(new FileWriter(file)); + try { + out.append(text); + } finally { + out.close(); + } + } + } + +} // class SourceReading Property changes on: trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java ___________________________________________________________________ Name: svn:mime-type + text/plain Name: svn:eol-style + LF Deleted: trunk/src/java/src/prj/net/sf/aceunit/SourceReading.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/SourceReading.java 2008-01-13 17:22:26 UTC (rev 285) +++ trunk/src/java/src/prj/net/sf/aceunit/SourceReading.java 2008-01-13 17:25:38 UTC (rev 286) @@ -1,76 +0,0 @@ -/* Copyright (c) 2008, Christian Hujer - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the AceUnit developers nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER - * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -package net.sf.aceunit; - -import org.jetbrains.annotations.NotNull; -import java.io.File; -import java.io.IOException; -import java.io.Reader; -import java.io.FileReader; - -/** Utility class with methods for reading source files. - * @author <a href="mailto:ch...@ri...">Christian Hujer</a> - */ -public abstract class SourceReading { - - /** Utility class - do not instanciate. */ - private SourceReading() {} - - /** Reads a source file. - * @param file File of the source to read. - * @return String with the contents of the specified file. - * @throws java.io.IOException in case of I/O problems. - */ - public static String readSource(@NotNull final File file) throws IOException { - final Reader in = new FileReader(file); - final StringBuilder sb = new StringBuilder(); - final char[] buf = new char[4096]; - for (int charsRead; (charsRead = in.read(buf)) != -1;) { - sb.append(buf, 0, charsRead); - } - in.close(); - return sb.toString(); - } - - /** Reads a source file without comments. - * @param file File of the source to read. - * @return String with the contents of the specified file. - * @throws java.io.IOException in case of I/O problems. - */ - public static String readSourceWithoutComments(@NotNull final File file) throws IOException { - final Reader in = new CommentToWhitespaceReader(new FileReader(file)); - final StringBuilder sb = new StringBuilder(); - final char[] buf = new char[4096]; - for (int charsRead; (charsRead = in.read(buf)) != -1;) { - sb.append(buf, 0, charsRead); - } - in.close(); - return sb.toString(); - } - -} // class SourceReading This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-13 17:22:29
|
Revision: 285 http://aceunit.svn.sourceforge.net/aceunit/?rev=285&view=rev Author: christianhujer Date: 2008-01-13 09:22:26 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Extracted utility methods into a class of their own. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java Added Paths: ----------- trunk/src/java/src/prj/net/sf/aceunit/SourceReading.java Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:18:47 UTC (rev 284) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:22:26 UTC (rev 285) @@ -29,11 +29,9 @@ import java.io.File; import java.io.FileFilter; -import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; -import java.io.Reader; import java.util.List; import net.sf.japi.io.args.ArgParser; import net.sf.japi.io.args.BasicCommand; @@ -162,7 +160,7 @@ * @throws IOException In case of I/O problems. */ void writeIfChanged(@NotNull final File file, @NotNull final String text) throws IOException { - if (!file.exists() || !text.equals(readSource(file))) { + if (!file.exists() || !text.equals(SourceReading.readSource(file))) { if (force) { file.setWritable(true); } @@ -183,7 +181,7 @@ */ private boolean performFixture(@NotNull final File base, @NotNull final File fixtureFile) throws IOException { final String fixtureName = fixtureFile.getName().replaceAll("\\.c$", ""); - final String cSource = readSourceWithoutComments(fixtureFile); + final String cSource = SourceReading.readSourceWithoutComments(fixtureFile); final Fixture fixture = new Fixture(getNextSuiteId()); final boolean containedFixture = fixture.findMethods(cSource); if (containedFixture) { @@ -194,38 +192,6 @@ return containedFixture; } - /** Reads a source file. - * @param file File of the source to read. - * @return String with the contents of the specified file. - * @throws IOException in case of I/O problems. - */ - private String readSource(@NotNull final File file) throws IOException { - final Reader in = new FileReader(file); - final StringBuilder sb = new StringBuilder(); - final char[] buf = new char[4096]; - for (int charsRead; (charsRead = in.read(buf)) != -1;) { - sb.append(buf, 0, charsRead); - } - in.close(); - return sb.toString(); - } - - /** Reads a source file without comments. - * @param file File of the source to read. - * @return String with the contents of the specified file. - * @throws IOException in case of I/O problems. - */ - private String readSourceWithoutComments(@NotNull final File file) throws IOException { - final Reader in = new CommentToWhitespaceReader(new FileReader(file)); - final StringBuilder sb = new StringBuilder(); - final char[] buf = new char[4096]; - for (int charsRead; (charsRead = in.read(buf)) != -1;) { - sb.append(buf, 0, charsRead); - } - in.close(); - return sb.toString(); - } - /** {@inheritDoc} */ public int run(@NotNull final List<String> args) throws Exception { if (args.size() == 0) { Added: trunk/src/java/src/prj/net/sf/aceunit/SourceReading.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/SourceReading.java (rev 0) +++ trunk/src/java/src/prj/net/sf/aceunit/SourceReading.java 2008-01-13 17:22:26 UTC (rev 285) @@ -0,0 +1,76 @@ +/* Copyright (c) 2008, Christian Hujer + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the AceUnit developers nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package net.sf.aceunit; + +import org.jetbrains.annotations.NotNull; +import java.io.File; +import java.io.IOException; +import java.io.Reader; +import java.io.FileReader; + +/** Utility class with methods for reading source files. + * @author <a href="mailto:ch...@ri...">Christian Hujer</a> + */ +public abstract class SourceReading { + + /** Utility class - do not instanciate. */ + private SourceReading() {} + + /** Reads a source file. + * @param file File of the source to read. + * @return String with the contents of the specified file. + * @throws java.io.IOException in case of I/O problems. + */ + public static String readSource(@NotNull final File file) throws IOException { + final Reader in = new FileReader(file); + final StringBuilder sb = new StringBuilder(); + final char[] buf = new char[4096]; + for (int charsRead; (charsRead = in.read(buf)) != -1;) { + sb.append(buf, 0, charsRead); + } + in.close(); + return sb.toString(); + } + + /** Reads a source file without comments. + * @param file File of the source to read. + * @return String with the contents of the specified file. + * @throws java.io.IOException in case of I/O problems. + */ + public static String readSourceWithoutComments(@NotNull final File file) throws IOException { + final Reader in = new CommentToWhitespaceReader(new FileReader(file)); + final StringBuilder sb = new StringBuilder(); + final char[] buf = new char[4096]; + for (int charsRead; (charsRead = in.read(buf)) != -1;) { + sb.append(buf, 0, charsRead); + } + in.close(); + return sb.toString(); + } + +} // class SourceReading Property changes on: trunk/src/java/src/prj/net/sf/aceunit/SourceReading.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...> - 2008-01-13 17:18:46
|
Revision: 284 http://aceunit.svn.sourceforge.net/aceunit/?rev=284&view=rev Author: christianhujer Date: 2008-01-13 09:18:47 -0800 (Sun, 13 Jan 2008) Log Message: ----------- Added proper ids for suites. Modified Paths: -------------- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java trunk/src/java/src/prj/net/sf/aceunit/GenTest.java Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-13 16:51:05 UTC (rev 283) +++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2008-01-13 17:18:47 UTC (rev 284) @@ -69,11 +69,6 @@ super(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. */ Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java =================================================================== --- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 16:51:05 UTC (rev 283) +++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2008-01-13 17:18:47 UTC (rev 284) @@ -74,12 +74,22 @@ /** Whether to overwrite write-protected files. */ private boolean force; + /** The last used id for suites. */ + private int lastSuiteId; + /** Creates a GenTest instance. * @throws IOException in case of I/O problems. */ public GenTest() throws IOException { } + /** Returns the next id for suites. + * @return The next id for suites. + */ + public int getNextSuiteId() { + return ++lastSuiteId; + } + /** Sets whether overwriting of existing files should be enforced. * @param force Whether overwriting of existing files should be enforced. */ @@ -174,7 +184,7 @@ private boolean performFixture(@NotNull final File base, @NotNull final File fixtureFile) throws IOException { final String fixtureName = fixtureFile.getName().replaceAll("\\.c$", ""); final String cSource = readSourceWithoutComments(fixtureFile); - final Fixture fixture = new Fixture(); + final Fixture fixture = new Fixture(getNextSuiteId()); final boolean containedFixture = fixture.findMethods(cSource); if (containedFixture) { final File hFile = new File(fixtureFile.getParent(), fixtureName + ".h"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |