aceunit-commit Mailing List for AceUnit
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...> - 2013-12-16 06:25:33
|
Revision: 583
http://sourceforge.net/p/aceunit/code/583
Author: christianhujer
Date: 2013-12-16 06:25:30 +0000 (Mon, 16 Dec 2013)
Log Message:
-----------
Experimental implementation of output directory.
Modified Paths:
--------------
trunk/src/java/src/prj/net/sf/aceunit/GenTest.java
Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2013-12-16 06:08:57 UTC (rev 582)
+++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2013-12-16 06:25:30 UTC (rev 583)
@@ -82,6 +82,15 @@
* The FileComparator for sorting.
*/
private FileComparator fileComparator = new FileComparator();
+ /**
+ * The name of the Makefile to which dependencies should be written.
+ */
+ // TODO:2013-12-16:christianhujer:Create that Makefile.
+ private String makefileFilename;
+ /**
+ * The name of the output directory to which generate files should be written.
+ */
+ private String outputDirectoryName;
/**
* Creates a GenTest instance.
@@ -145,6 +154,26 @@
}
/**
+ * Sets the output directory to which generated files should be written.
+ *
+ * @param outputDirectoryName Filename of the output directory to which generated files should be written.
+ */
+ @Option("todir")
+ public void setOutputDirectoryName(@Nullable final String outputDirectoryName) {
+ this.outputDirectoryName = outputDirectoryName;
+ }
+
+ /**
+ * Sets the filename of the Makefile to write.
+ *
+ * @param makefileFilename Filename of the Makefile to which dependencies should be written.
+ */
+ @Option("MMD")
+ public void setMakefileFilename(@Nullable final String makefileFilename) {
+ this.makefileFilename = makefileFilename;
+ }
+
+ /**
* Sets the locale for sorting files.
*
* @param fileSortingLocale Locale for sorting files.
@@ -324,17 +353,13 @@
*/
private File getFileForFixtureH(final File fixtureFile, final String fixtureName) {
// TODO:2013-12-15:christianhujer:Why is fixtureName needed if fixtureFile is there?
- // TODO:2013-12-15:christianhujer:Implement feature to store the files in a user-defined output directory.
- // The user should be able to choose whether the structure should be hierarchical, creating directories, or flattened.
- // The mechanism should be coupled with getFileForSuiteC.
- return new File(fixtureFile.getParent(), fixtureName + ".h");
+ final String outputDirectory = outputDirectoryName != null ? outputDirectoryName : fixtureFile.getParent();
+ return new File(outputDirectory, fixtureName + ".h");
}
private File getFileForSuiteC(final File pckgDir, final Pckg pckg) {
- // TODO:2013-12-15:christianhujer:Implement feature to store the files in a user-defined output directory.
- // The user should be able to choose whether the structure should be hierarchical, creating directories, or flattened.
- // The mechanism should be coupled with getFileForFixtureH.
- return new File(pckgDir, "Suite" + pckg.getId() + ".c");
+ final File outputDirectory = outputDirectoryName != null ? new File(outputDirectoryName) : pckgDir;
+ return new File(outputDirectory, "Suite" + pckg.getId() + ".c");
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2013-12-16 06:09:02
|
Revision: 582
http://sourceforge.net/p/aceunit/code/582
Author: christianhujer
Date: 2013-12-16 06:08:57 +0000 (Mon, 16 Dec 2013)
Log Message:
-----------
[Generator] Clean code.
Modified Paths:
--------------
trunk/src/java/AceUnit.ipr
trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java
trunk/src/java/src/prj/net/sf/aceunit/FileComparator.java
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/IdGenerator.java
trunk/src/java/src/prj/net/sf/aceunit/MethodList.java
trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java
trunk/src/java/src/prj/net/sf/aceunit/Pckg.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/prj/net/sf/aceunit/Test.java
trunk/src/java/src/prj/net/sf/aceunit/TestCase.java
trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java
Modified: trunk/src/java/AceUnit.ipr
===================================================================
--- trunk/src/java/AceUnit.ipr 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/AceUnit.ipr 2013-12-16 06:08:57 UTC (rev 582)
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project relativePaths="false" version="4">
- <component name="AntConfiguration">
- <defaultAnt bundledAnt="true" />
- </component>
+<project version="4">
<component name="BuildJarProjectSettings">
<option name="BUILD_JARS_ON_MAKE" value="false" />
</component>
@@ -16,7 +13,6 @@
</component>
<component name="CompilerConfiguration">
<option name="DEFAULT_COMPILER" value="Javac" />
- <option name="DEPLOY_AFTER_MAKE" value="0" />
<resourceExtensions>
<entry name=".+\.(properties|xml|html|dtd|tld)" />
<entry name=".+\.(gif|png|jpeg|jpg)" />
@@ -32,7 +28,15 @@
<entry name="?*.dtd" />
<entry name="?*.tld" />
</wildcardResourcePatterns>
+ <annotationProcessing>
+ <profile default="true" name="Default" enabled="false">
+ <processorPath useClasspath="true" />
+ </profile>
+ </annotationProcessing>
</component>
+ <component name="CopyrightManager" default="">
+ <module2copyright />
+ </component>
<component name="DependenciesAnalyzeManager">
<option name="myForwardDirection" value="false" />
</component>
@@ -69,32 +73,53 @@
</component>
<component name="IdProvider" IDEtalkID="4DF825BE29C228E7919AB5B53C9F87CB" />
<component name="InspectionProjectProfileManager">
- <option name="PROJECT_PROFILE" value="Project Default" />
- <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
- <scopes />
<profiles>
<profile version="1.0" is_locked="false">
<option name="myName" value="Project Default" />
<option name="myLocal" value="false" />
- <inspection_tool class="PublicField" level="WARNING" enabled="true">
+ <inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
+ <option name="TOP_LEVEL_CLASS_OPTIONS">
+ <value>
+ <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
+ <option name="REQUIRED_TAGS" value="" />
+ </value>
+ </option>
+ <option name="INNER_CLASS_OPTIONS">
+ <value>
+ <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
+ <option name="REQUIRED_TAGS" value="" />
+ </value>
+ </option>
+ <option name="METHOD_OPTIONS">
+ <value>
+ <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
+ <option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
+ </value>
+ </option>
+ <option name="FIELD_OPTIONS">
+ <value>
+ <option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
+ <option name="REQUIRED_TAGS" value="" />
+ </value>
+ </option>
+ <option name="IGNORE_DEPRECATED" value="false" />
+ <option name="IGNORE_JAVADOC_PERIOD" value="true" />
+ <option name="IGNORE_DUPLICATED_THROWS" value="false" />
+ <option name="IGNORE_POINT_TO_ITSELF" value="false" />
+ <option name="myAdditionalJavadocTags" value="note" />
+ </inspection_tool>
+ <inspection_tool class="PublicField" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoreEnums" value="false" />
+ <option name="ignorableAnnotations">
+ <value />
+ </option>
</inspection_tool>
</profile>
</profiles>
- <list size="4">
- <item index="0" class="java.lang.String" itemvalue="SERVER PROBLEM" />
- <item index="1" class="java.lang.String" itemvalue="INFO" />
- <item index="2" class="java.lang.String" itemvalue="WARNING" />
- <item index="3" class="java.lang.String" itemvalue="ERROR" />
- </list>
+ <option name="PROJECT_PROFILE" value="Project Default" />
+ <option name="USE_PROJECT_PROFILE" value="true" />
+ <version value="1.0" />
</component>
- <component name="JavacSettings">
- <option name="DEBUGGING_INFO" value="true" />
- <option name="GENERATE_NO_WARNINGS" value="false" />
- <option name="DEPRECATION" value="true" />
- <option name="ADDITIONAL_OPTIONS_STRING" value="" />
- <option name="MAXIMUM_HEAP_SIZE" value="128" />
- </component>
<component name="JavadocGenerationManager">
<option name="OUTPUT_DIRECTORY" />
<option name="OPTION_SCOPE" value="protected" />
@@ -241,10 +266,31 @@
</item>
</group>
</component>
+ <component name="ProjectCodeStyleSettingsManager">
+ <option name="PER_PROJECT_SETTINGS">
+ <value>
+ <XML>
+ <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
+ </XML>
+ </value>
+ </option>
+ <option name="PREFERRED_PROJECT_CODE_STYLE" value="Default (1)" />
+ </component>
<component name="ProjectDetails">
<option name="projectName" value="AceUnit" />
</component>
- <component name="ProjectFileVersion" converted="true" />
+ <component name="ProjectDictionaryState">
+ <dictionary name="cher">
+ <words>
+ <w>aceunit</w>
+ <w>christianhujer</w>
+ <w>cplusplus</w>
+ <w>extern</w>
+ <w>hujer</w>
+ <w>pckg</w>
+ </words>
+ </dictionary>
+ </component>
<component name="ProjectKey">
<option name="state" value="https://aceunit.svn.sourceforge.net/svnroot/aceunit/trunk/src/java/AceUnit.ipr" />
</component>
@@ -265,7 +311,7 @@
</option>
<option name="lastEditedConfigurable" value="Project 'Default (Template) Project'" />
</component>
- <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="latest" project-jdk-type="JavaSDK">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
<component name="ResourceManagerContainer">
Modified: trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -27,13 +27,13 @@
package net.sf.aceunit;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
import java.io.FilterReader;
+import java.io.IOException;
import java.io.Reader;
-import java.io.IOException;
-import org.jetbrains.annotations.Nullable;
-import org.jetbrains.annotations.NotNull;
-
/**
* A NoCommentReader is a reader which replaces comments (C++, C99, Java) with whitespace.
*
@@ -41,51 +41,16 @@
*/
public class CommentToWhitespaceReader extends FilterReader {
- /** The internal states of the parser. */
- private enum State {
-
- /** Nothing special, normal source. */
- NORMAL,
-
- /** A slash was found, we might have a comment. */
- SLASH,
-
- /** A second slash was found, we are in an EOL comment now. */
- EOL_COMMENT,
-
- /** An escape was found in an EOL comment. */
- ESCAPE_IN_EOL_COMMENT,
-
- /** An asterisk after a slash was found, we are in a multiline comment now. */
- ML_COMMENT,
-
- /** An asterisk was found inside a multiline comment, we might have an end of the multiline comment. */
- MAYBE_END_OF_ML_COMMENT,
-
- /** A backslash was found, we are in escape mode. */
- ESCAPE,
-
- /** An apostrophe was found, we are inside a char literal. */
- CHAR,
-
- /** A backslash was found inside a char literal, the next char will NOT end it even if it is an apostrophe. */
- ESCAPE_IN_CHAR,
-
- /** A double quote was found, we are inside a string literal. */
- STRING,
-
- /** A backslash was found inside a string literal, the next char will NOT end it even if it is a double quote. */
- ESCAPE_IN_STRING
- } // enum State
-
- /** The Sync Lock. */
+ /**
+ * The Sync Lock.
+ */
@NotNull
private final Object syncLock = new Object();
-
- /** The internal parser state, we begin with State.NORMAL. */
+ /**
+ * The internal parser state, we begin with State.NORMAL.
+ */
@NotNull
private State state = State.NORMAL;
-
/**
* The cached character is used to return a char that can only be returned when its following char was known.
* If this is <code>null</code>, there is no cached character.
@@ -103,7 +68,9 @@
super(in);
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public int read() throws IOException {
synchronized (syncLock) {
final Integer cachedChar = this.cachedChar;
@@ -269,7 +236,9 @@
return rc;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public int read(@NotNull final char[] charBuffer, final int off, final int len) throws IOException {
int i;
for (i = 0; i < len; i++) {
@@ -286,4 +255,65 @@
return i;
}
-} // class CommentToWhitespaceReader
+ /**
+ * The internal states of the parser.
+ */
+ private enum State {
+
+ /**
+ * Nothing special, normal source.
+ */
+ NORMAL,
+
+ /**
+ * A slash was found, we might have a comment.
+ */
+ SLASH,
+
+ /**
+ * A second slash was found, we are in an EOL comment now.
+ */
+ EOL_COMMENT,
+
+ /**
+ * An escape was found in an EOL comment.
+ */
+ ESCAPE_IN_EOL_COMMENT,
+
+ /**
+ * An asterisk after a slash was found, we are in a multiline comment now.
+ */
+ ML_COMMENT,
+
+ /**
+ * An asterisk was found inside a multiline comment, we might have an end of the multiline comment.
+ */
+ MAYBE_END_OF_ML_COMMENT,
+
+ /**
+ * A backslash was found, we are in escape mode.
+ */
+ ESCAPE,
+
+ /**
+ * An apostrophe was found, we are inside a char literal.
+ */
+ CHAR,
+
+ /**
+ * A backslash was found inside a char literal, the next char will NOT end it even if it is an apostrophe.
+ */
+ ESCAPE_IN_CHAR,
+
+ /**
+ * A double quote was found, we are inside a string literal.
+ */
+ STRING,
+
+ /**
+ * A backslash was found inside a string literal, the next char will NOT end it even if it is a double quote.
+ */
+ ESCAPE_IN_STRING
+ }
+
+}
Modified: trunk/src/java/src/prj/net/sf/aceunit/FileComparator.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/FileComparator.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/FileComparator.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -32,7 +32,9 @@
import java.util.Comparator;
import java.util.Locale;
-/** Comparator for Files.
+/**
+ * Comparator for Files.
+ *
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public class FileComparator implements Comparator<File> {
@@ -43,31 +45,40 @@
// A WeakHashMap<File, String> could cache the File.toString() results.
// If performance is an issue, this also could be a WeakHashMap<File, CollationKey>.
- /** The Collator of this FileComparator. */
+ /**
+ * The Collator of this FileComparator.
+ */
private final Collator collator;
- /** Creates a FileComparator w/o locale.
+ /**
+ * Creates a FileComparator w/o locale.
* The natural ordering of files is used.
*/
public FileComparator() {
this((Collator) null);
}
- /** Creates a FileComparator.
+ /**
+ * Creates a FileComparator.
+ *
* @param locale Locale for comparing file(name)s.
*/
public FileComparator(final Locale locale) {
this(Collator.getInstance(locale));
}
- /** Creates a FileComparator.
+ /**
+ * Creates a FileComparator.
+ *
* @param collator Collator for comparing file(name)s.
*/
public FileComparator(final Collator collator) {
this.collator = collator;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public int compare(final File o1, final File o2) {
if (collator == null) {
return o1.compareTo(o2);
Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -27,13 +27,15 @@
package net.sf.aceunit;
-import java.util.*;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
import java.io.File;
import java.io.IOException;
+import java.util.Arrays;
+import java.util.Formatter;
+import java.util.List;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
/**
* 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.
@@ -43,34 +45,45 @@
*/
public class Fixture extends Suite<TestCase> {
- /** The list of {@code @Test} methods. */
+ /**
+ * The list of {@code @Test} methods.
+ */
private final MethodList testMethods = MethodList.createTestMethodList();
-
- /** The list of {@code @Before} methods. */
+ /**
+ * The list of {@code @Before} methods.
+ */
private final MethodList beforeMethods = MethodList.createBeforeMethodList();
-
- /** The list of {@code @After} methods. */
+ /**
+ * The list of {@code @After} methods.
+ */
private final MethodList afterMethods = MethodList.createAfterMethodList();
-
- /** The list of {@code @BeforeClass} methods. */
+ /**
+ * The list of {@code @BeforeClass} methods.
+ */
private final MethodList beforeClassMethods = MethodList.createBeforeClassMethodList();
-
- /** The list of {@code @AfterClass} methods. */
+ /**
+ * The list of {@code @AfterClass} methods.
+ */
private final MethodList afterClassMethods = MethodList.createAfterClassMethodList();
-
- /** The list of {@code @Ignore} methods. */
+ /**
+ * The list of {@code @Ignore} methods.
+ */
private final MethodList ignoreMethods = MethodList.createIgnoreMethodList();
-
- /** The list of {@code @Loop} methods. */
+ /**
+ * The list of {@code @Loop} methods.
+ */
private final MethodList2 loopMethods = MethodList.createLoopMethodList();
-
- /** The list of {@code @Group} methods. */
+ /**
+ * The list of {@code @Group} methods.
+ */
private final MethodList2 groupMethods = MethodList.createGroupMethodList();
-
- /** All method lists for easy iteration. */
+ /**
+ * All method lists for easy iteration.
+ */
private final List<MethodList> methodLists = Arrays.asList(testMethods, beforeMethods, afterMethods, beforeClassMethods, afterClassMethods, ignoreMethods, loopMethods, groupMethods);
-
- /** All method lists for used methods for easy iteration. */
+ /**
+ * All method lists for used methods for easy iteration.
+ */
private final List<MethodList> usedMethodLists = Arrays.asList(testMethods, beforeMethods, afterMethods, beforeClassMethods, afterClassMethods);
/**
@@ -87,8 +100,8 @@
/**
* Creates a Fixture with the specified id.
*
- * @param file File to create fixture for.
- * @param source The source of this Fixture.
+ * @param file File to create fixture for.
+ * @param source The source of this Fixture.
*/
public Fixture(@Nullable final File file, @Nullable final String source) {
super(file != null ? file.getName().replaceAll("\\.c$", "") : "dummy");
@@ -97,6 +110,20 @@
}
}
+ private static String getHeader(final String baseName) {
+ final Formatter out = new Formatter();
+ out.format("/** AceUnit test header file for fixture %s.%n", baseName);
+ out.format(" *%n");
+ out.format(" * You may wonder why this is a header file and yet generates program elements.%n");
+ out.format(" * This allows you to declare test methods as static.%n");
+ out.format(" *%n");
+ out.format(" * @warning This is a generated file. Do not edit. Your changes will be lost.%n");
+ out.format(" * @file %s.h%n", baseName);
+ out.format(" */%n");
+ out.format("%n");
+ return out.toString();
+ }
+
/**
* Finds all methods of all method lists in the specified source.
*
@@ -109,24 +136,20 @@
testMethods.removeAll(ignoreMethods);
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public boolean containsTests() {
return testMethods.size() > 0;
}
- /** {@inheritDoc} */
+ /**
+ * {@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);
- out.format(" *%n");
- out.format(" * You may wonder why this is a header file and yet generates program elements.%n");
- out.format(" * This allows you to declare test methods as static.%n");
- out.format(" *%n");
- out.format(" * @warning This is a generated file. Do not edit. Your changes will be lost.%n");
- out.format(" * @file %s.h%n", baseName);
- out.format(" */%n");
- out.format("%n");
+ out.format("%s", getHeader(baseName));
final String uppercaseFixture = baseName.toUpperCase();
out.format("#ifndef _%s_H%n", uppercaseFixture);
@@ -234,12 +257,16 @@
return out.toString();
}
- /** {@inheritDoc} */
- @Override public String getGlobalVariableName() {
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getGlobalVariableName() {
return getName() + "Fixture";
}
- /** Creates a TestCase for each contained test method.
+ /**
+ * Creates a TestCase for each contained test method.
*/
public void createTestCases() {
for (final String method : testMethods) {
@@ -247,4 +274,4 @@
}
}
-} // class MethodLists
+}
Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -27,15 +27,15 @@
package net.sf.aceunit;
-import java.io.*;
-import java.util.*;
-
import net.sf.japi.io.args.ArgParser;
import net.sf.japi.io.args.BasicCommand;
import net.sf.japi.io.args.Option;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
+import java.io.*;
+import java.util.*;
+
/**
* Program for generating the code that's needed to execute a fixture.
* This is a prototype in Java.
@@ -43,45 +43,44 @@
*
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
+// TODO:2013-12-15:christianhujer:Add mode that generates a dependency file for make.
+// That dependency file should depend on the input files to AceUnit.
public class GenTest extends BasicCommand {
/**
- * 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.
- * @throws IOException in case of I/O problems.
- * @note the interface is subject of change.
+ * What to print.
*/
- public static void main(@NotNull final String... args) throws IOException {
- ArgParser.simpleParseAndRun(new GenTest(), args);
- }
-
- /** Whether to overwrite write-protected files. */
- private boolean force;
-
- /** Whether or not to generate suites. */
- private boolean genSuites = true;
-
- /** What to print. */
private final EnumSet<Print> printSet = EnumSet.noneOf(Print.class);
-
- /** Filename to which a table of all tests is written. */
- @Nullable private String allTestsFilename;
-
/**
* 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();
-
- /** The flattened list of all tests. */
+ /**
+ * The flattened list of all tests.
+ */
private final List<String> allTests = new ArrayList<String>();
-
- /** The root packages which were found so far. */
+ /**
+ * The root packages which were found so far.
+ */
private final List<Pckg> roots = new ArrayList<Pckg>();
-
- /** The FileComparator for sorting. */
+ /**
+ * Whether to overwrite write-protected files.
+ */
+ private boolean force;
+ /**
+ * Whether or not to generate suites.
+ */
+ private boolean genSuites = true;
+ /**
+ * Filename to which a table of all tests is written.
+ */
+ @Nullable
+ private String allTestsFilename;
+ /**
+ * The FileComparator for sorting.
+ */
private FileComparator fileComparator = new FileComparator();
/**
@@ -93,6 +92,17 @@
}
/**
+ * 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.
+ * @throws IOException in case of I/O problems.
+ * @note the interface is subject of change.
+ */
+ public static void main(@NotNull final String... args) throws IOException {
+ ArgParser.simpleParseAndRun(new GenTest(), args);
+ }
+
+ /**
* Sets whether overwriting of existing files should be enforced or not.
*
* @param force Whether overwriting of existing files should be enforced.
@@ -104,6 +114,7 @@
/**
* Sets which names to print.
+ *
* @param print Which filenames to print.
*/
@Option({"print"})
@@ -125,6 +136,7 @@
/**
* Sets the filename of the file to which a table of all tests is written.
+ *
* @param allTestsFilename Filename of the file to which a table of all tests shall be written.
*/
@Option({"o"})
@@ -134,6 +146,7 @@
/**
* Sets the locale for sorting files.
+ *
* @param fileSortingLocale Locale for sorting files.
*/
@Option({"locale"})
@@ -162,7 +175,7 @@
*/
private boolean perform(@NotNull final String baseName) throws IOException {
final File baseDir = new File(baseName);
- final File[] fixtureFiles = { new File(baseName + ".c"), new File(baseName + ".cpp") };
+ final File[] fixtureFiles = {new File(baseName + ".c"), new File(baseName + ".cpp")};
boolean baseFound = false;
boolean testsFound = false;
if (baseDir.isDirectory()) {
@@ -195,8 +208,10 @@
return baseFound || testsFound;
}
- /** Returns a sorted array of files from the given directory which match the given filter.
- * @param dir Directory of which to list files.
+ /**
+ * Returns a sorted array of files from the given directory which match the given filter.
+ *
+ * @param dir Directory of which to list files.
* @param fileFilter Filter for the files.
* @return sorted array of files.
*/
@@ -241,10 +256,11 @@
if (parent != null) {
pckg.setId(idGenerator);
}
- final File cFile = new File(pckgDir, "Suite" + pckg.getId() + ".c");
+ final File cFile = getFileForSuiteC(pckgDir, pckg);
if (printSet.contains(Print.sources) || printSet.contains(Print.suites) || printSet.contains(Print.generated)) {
System.out.println(cFile);
}
+ // FIXME:2013-12-15:christianhujer:Fix bogus package name foo.
final String hSource = pckg.getCode("foo");
if (genSuites) {
SourceFiles.writeIfChanged(cFile, hSource, force);
@@ -257,6 +273,8 @@
return containedFixture;
}
+ // TODO:2013-12-15:christianhujer:Why is base passed? It's unused.
+
/**
* Performs the generation of tests for a fixtureFile.
*
@@ -267,6 +285,7 @@
* @throws IOException In case of I/O problems.
*/
private boolean performFixture(@NotNull final File base, @NotNull final Pckg pckg, @NotNull final File fixtureFile) throws IOException {
+ // TODO:2013-12-15:christianhujer:Why is this called performFixture if it can obviously also called for Suites?
if (fixtureFile.getName().matches("Suite\\d+\\.c")) {
return false;
}
@@ -278,7 +297,7 @@
for (final TestCase testCase : fixture.getTests()) {
allTests.add(testCase.getName());
}
- final File hFile = new File(fixtureFile.getParent(), fixtureName + ".h");
+ final File hFile = getFileForFixtureH(fixtureFile, fixtureName);
if (printSet.contains(Print.sources) || printSet.contains(Print.fixtures)) {
System.out.println(fixtureFile);
}
@@ -289,12 +308,38 @@
final String hSource = fixture.getCode(fixtureName);
SourceFiles.writeIfChanged(hFile, hSource, force);
pckg.addSuite(fixture);
+ // TODO:2013-12-15:christianhujer:Why are \ and / replaced with .? This is the name, not the path.
allTests.add(fixtureName.replaceAll("[\\\\/]", "."));
}
return containedFixture;
}
- /** Writes all tests to the file in {@link #allTestsFilename} if it is not null.
+ /**
+ * Returns the File to which the header file for the specified fixture should be written.
+ * This can either be a header file in the directory of the source file, or a header file in a user-defined output directory.
+ *
+ * @param fixtureFile File of the original fixture C source code.
+ * @param fixtureName Name of the fixture.
+ * @return
+ */
+ private File getFileForFixtureH(final File fixtureFile, final String fixtureName) {
+ // TODO:2013-12-15:christianhujer:Why is fixtureName needed if fixtureFile is there?
+ // TODO:2013-12-15:christianhujer:Implement feature to store the files in a user-defined output directory.
+ // The user should be able to choose whether the structure should be hierarchical, creating directories, or flattened.
+ // The mechanism should be coupled with getFileForSuiteC.
+ return new File(fixtureFile.getParent(), fixtureName + ".h");
+ }
+
+ private File getFileForSuiteC(final File pckgDir, final Pckg pckg) {
+ // TODO:2013-12-15:christianhujer:Implement feature to store the files in a user-defined output directory.
+ // The user should be able to choose whether the structure should be hierarchical, creating directories, or flattened.
+ // The mechanism should be coupled with getFileForFixtureH.
+ return new File(pckgDir, "Suite" + pckg.getId() + ".c");
+ }
+
+ /**
+ * Writes all tests to the file in {@link #allTestsFilename} if it is not null.
+ *
* @throws IOException in case of I/O problems.
*/
private void writeAllTests() throws IOException {
@@ -302,11 +347,10 @@
if (filename == null) {
return;
}
- final PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(filename)));
- if (printSet.contains(Print.generated)) {
- System.out.println(allTestsFilename);
- }
- try {
+ try (final PrintWriter out = new PrintWriter(new OutputStreamWriter(new FileOutputStream(filename)))) {
+ if (printSet.contains(Print.generated)) {
+ System.out.println(allTestsFilename);
+ }
for (final Pckg pckg : roots) {
writeAllTests(out, pckg);
}
@@ -314,13 +358,13 @@
//for (final Integer id : new TreeSet<Integer>(allTests.keySet())) {
// out.format("%d: %s%n", id, allTests.get(id));
//}
- } finally {
- out.close();
}
}
- /** Writes all tests of <var>test</var> including <var>test</var> itself to <var>out</var>.
- * @param out PrintWriter to append to.
+ /**
+ * Writes all tests of <var>test</var> including <var>test</var> itself to <var>out</var>.
+ *
+ * @param out PrintWriter to append to.
* @param test Package to append.
* @throws IOException in case of I/O problems.
*/
@@ -333,7 +377,9 @@
}
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public int run(@NotNull final List<String> args) throws Exception {
if (args.isEmpty()) {
help();
@@ -350,24 +396,36 @@
return okay ? 0 : 1;
}
- /** Enum that describes what to print.
+ /**
+ * Enum that describes what to print.
+ *
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
static enum Print {
- /** Print suite names. */
+ /**
+ * Print suite names.
+ */
suites,
- /** Print fixture sources. */
+ /**
+ * Print fixture sources.
+ */
fixtures,
- /** Print generated files. */
+ /**
+ * Print generated files.
+ */
generated,
- /** Print header files. */
+ /**
+ * Print header files.
+ */
headers,
- /** Print source files. */
+ /**
+ * Print source files.
+ */
sources,
}
-} // class GenTest
+}
Modified: trunk/src/java/src/prj/net/sf/aceunit/IdGenerator.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/IdGenerator.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/IdGenerator.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -7,7 +7,9 @@
*/
public class IdGenerator {
- /** The last used id. */
+ /**
+ * The last used id.
+ */
private int lastId;
/**
@@ -21,7 +23,7 @@
/**
* Creates an IdGenerator.
*
- * @param lastId Last id used, {@link #getNextId()} will return that value + 1.
+ * @param lastId Last id used, the first call to {@link #getNextId()} will return that value + 1.
*/
public IdGenerator(final int lastId) {
this.lastId = lastId;
@@ -36,4 +38,4 @@
return ++lastId;
}
-} // class IdGenerator
+}
Modified: trunk/src/java/src/prj/net/sf/aceunit/MethodList.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/MethodList.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/MethodList.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -27,16 +27,12 @@
package net.sf.aceunit;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.jetbrains.annotations.NotNull;
-
/**
* A MethodList finds and contains all methods of a certain annotation type.
*
@@ -44,28 +40,35 @@
*/
public class MethodList implements Iterable<String> {
- /** The annotation to find. */
+ /**
+ * The names of the methods found to be annotated.
+ */
@NotNull
+ protected final List<String> methodNames = new ArrayList<String>();
+ /**
+ * The annotation to find.
+ */
+ @NotNull
private final String annotation;
-
- /** The regular expression to use for finding annotated methods. */
+ /**
+ * The regular expression to use for finding annotated methods.
+ */
@NotNull
private final Pattern pattern;
-
- /** The variable name to use for symbols related to this MethodList. */
+ /**
+ * The variable name to use for symbols related to this MethodList.
+ */
@NotNull
private final String symName;
-
- /** The title to use for this method list, used in comments. */
+ /**
+ * The title to use for this method list, used in comments.
+ */
@NotNull
private final String title;
-
- /** The names of the methods found to be annotated. */
+ /**
+ * The unmodifiable view of {@link #methodNames}.
+ */
@NotNull
- protected final List<String> methodNames = new ArrayList<String>();
-
- /** The unmodifiable view of {@link #methodNames}. */
- @NotNull
private final Collection<String> unmodifiableMethodNames = Collections.unmodifiableCollection(methodNames);
/**
@@ -140,6 +143,7 @@
/**
* Creates a MethodList for A_Loop.
+ *
* @return MethodList for A_Loop
*/
public static MethodList2 createLoopMethodList() {
@@ -148,6 +152,7 @@
/**
* Creates a MethodList for A_Group.
+ *
* @return MethodList for A_Group
*/
public static MethodList2 createGroupMethodList() {
@@ -187,7 +192,9 @@
return methodNames.contains(methodName);
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@NotNull
public Iterator<String> iterator() {
return methodNames.iterator();
@@ -221,7 +228,9 @@
return methodNames.size();
}
- /** Returns the variable name to use for symbols related to this MethodList.
+ /**
+ * Returns the variable name to use for symbols related to this MethodList.
+ *
* @return the variable name to use for symbols related to this MethodList.
*/
@NotNull
@@ -229,11 +238,13 @@
return symName;
}
- /** Returns the title to use for this method list, used in comments.
+ /**
+ * Returns the title to use for this method list, used in comments.
+ *
* @return the title to use for this method list, used in comments.
*/
@NotNull
public String getTitle() {
return title;
}
-} // class MethodList
+}
Modified: trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -27,33 +27,43 @@
package net.sf.aceunit;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-/** Special variant of MethodList which supports a parametrized annotation.
+/**
+ * Special variant of MethodList which supports a parametrized annotation.
+ *
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public class MethodList2 extends MethodList {
- /** The regular expression to use for finding annotated methods. */
- @NotNull private final Pattern pattern;
-
- /** The arguments. */
- private final Map<String, String> args = new HashMap<String, String>();
-
- /** The default value returned by {@link #getArg(String)} in case no method was annotated with this annotation. */
+ /**
+ * The regular expression to use for finding annotated methods.
+ */
+ @NotNull
+ private final Pattern pattern;
+ /**
+ * The arguments.
+ */
+ private final Map<String, String> args = new HashMap<>();
+ /**
+ * The default value returned by {@link #getArg(String)} in case no method was annotated with this annotation.
+ */
private final String defaultValue;
- /** Create a MethodList.
+ /**
+ * Create a MethodList.
* The MethodList is initially empty.
* Invoke {@link #findMethods(String)} to fill this MethodList.
- * @param annotation Annotation to find.
- * @param symName Name to use for symbols related to this MethodList.
- * @param title Title to use e.g. in comments.
+ *
+ * @param annotation Annotation to find.
+ * @param symName Name to use for symbols related to this MethodList.
+ * @param title Title to use e.g. in comments.
* @param defaultValue Default value to return by {@link #getArg(String)} for not annotated methods.
*/
public MethodList2(@NotNull final String annotation, @NotNull final String symName, @NotNull final String title, @Nullable final String defaultValue) {
@@ -62,7 +72,9 @@
this.defaultValue = defaultValue;
}
- /** Finds all annotated methods in the specified C source.
+ /**
+ * Finds all annotated methods in the specified C source.
+ *
* @param cSource C source to search.
*/
public void findMethods(@NotNull final String cSource) {
@@ -84,11 +96,14 @@
}
}
- /** Returns the loop annotation argument of the specified method.
+ /**
+ * Returns the loop annotation argument of the specified method.
+ *
* @param methodName Method for which to get the loop argument.
* @return Loop argument of the specified method.
*/
- @Nullable public String getArg(@NotNull final String methodName) {
+ @Nullable
+ public String getArg(@NotNull final String methodName) {
return args.containsKey(methodName) ? args.get(methodName) : defaultValue;
}
Modified: trunk/src/java/src/prj/net/sf/aceunit/Pckg.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -36,20 +36,23 @@
*
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public class Pckg extends Suite<Suite<?>> {
+public class Pckg extends Suite<Suite<? extends Test>> {
/**
* Creates a Pckg with the specified id.
+ *
* @param name Name of this Pckg.
*/
public Pckg(@NotNull final String name) {
super(name);
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
public boolean containsTests() {
boolean containsTests = false;
- for (final Suite<?> suite : getTests()) {
+ for (final Suite<? extends Test> suite : getTests()) {
containsTests = containsTests || suite.containsTests();
}
return containsTests;
@@ -60,11 +63,13 @@
*
* @param suite Suite to add
*/
- public void addSuite(@NotNull final Suite<?> suite) {
+ public void addSuite(@NotNull final Suite<? extends Test> suite) {
add(suite);
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@NotNull
public String getCode(@NotNull final String baseName) {
final Formatter out = new Formatter();
@@ -78,12 +83,12 @@
out.format("%n");
out.format("#ifdef ACEUNIT_SUITES%n");
out.format("%n");
- for (final Suite<?> suite : getTests()) {
+ for (final Suite<? extends Test> suite : getTests()) {
out.format("extern TestSuite_t %s;%n", suite.getGlobalVariableName());
}
out.format("%n");
out.format("const TestSuite_t *suitesOf%d[] = {%n", getId());
- for (final Suite<?> suite : getTests()) {
+ for (final Suite<? extends Test> suite : getTests()) {
out.format(" &%s,%n", suite.getGlobalVariableName());
}
out.format(" NULL%n");
@@ -104,4 +109,4 @@
return out.toString();
}
-} // class Suite
+}
Modified: trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -29,14 +29,8 @@
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;
-import java.io.FileFilter;
-import java.io.BufferedReader;
+import java.io.*;
+
import static java.util.logging.Logger.getAnonymousLogger;
/**
@@ -46,23 +40,27 @@
*/
public final class SourceFiles {
- /** FileFilter to get directories. */
+ /**
+ * FileFilter to get directories.
+ */
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. */
+ /**
+ * FileFilter to get C source files.
+ */
public static final FileFilter C_SOURCE_FILTER = new FileFilter() {
/** {@inheritDoc} */
public boolean accept(final File pathname) {
return pathname.isFile() && pathname.getName().endsWith(".c");
}
};
-
- /** FileFilter to get C++ source files. */
+ /**
+ * FileFilter to get C++ source files.
+ */
public static final FileFilter CPP_SOURCE_FILTER = new FileFilter() {
/** {@inheritDoc} */
public boolean accept(final File pathname) {
@@ -71,12 +69,8 @@
};
/**
- * Flag to remember whether we've already warned the user about 1.6 being required for removing a write protection from a file.
- * We do not want to spam the user with the same message over and over again.
+ * Utility class - do not instance.
*/
- private static boolean warned16RequiredForSetWritable;
-
- /** Utility class - do not instance. */
private SourceFiles() {
}
@@ -91,7 +85,7 @@
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;) {
+ for (int charsRead; (charsRead = in.read(buf)) != -1; ) {
sb.append(buf, 0, charsRead);
}
in.close();
@@ -109,7 +103,7 @@
final Reader in = new CommentToWhitespaceReader(new BufferedReader(new FileReader(file)));
final StringBuilder sb = new StringBuilder();
final char[] buf = new char[4096];
- for (int charsRead; (charsRead = in.read(buf)) != -1;) {
+ for (int charsRead; (charsRead = in.read(buf)) != -1; ) {
sb.append(buf, 0, charsRead);
}
in.close();
@@ -126,28 +120,16 @@
*/
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) {
- if (!file.canWrite()) {
- getAnonymousLogger().info("Removing write protection from " + file);
- try {
- if (!file.setWritable(true)) {
- getAnonymousLogger().warning("Couldn't remove write protection from " + file);
- }
- } catch (final NoSuchMethodError e) {
- if (!warned16RequiredForSetWritable) {
- getAnonymousLogger().warning("Java 1.6 required for removing write protections.");
- warned16RequiredForSetWritable = true;
- }
- }
+ if (force && !file.canWrite()) {
+ getAnonymousLogger().info("Removing write protection from " + file);
+ if (!file.setWritable(true)) {
+ getAnonymousLogger().warning("Couldn't remove write protection from " + file);
}
}
- final PrintWriter out = new PrintWriter(new FileWriter(file));
- try {
+ try (final PrintWriter out = new PrintWriter(new FileWriter(file))) {
out.append(text);
- } finally {
- out.close();
}
}
}
-} // class SourceReading
+}
Modified: trunk/src/java/src/prj/net/sf/aceunit/Suite.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -28,10 +28,11 @@
package net.sf.aceunit;
import org.jetbrains.annotations.NotNull;
+
import java.util.ArrayList;
-import java.util.List;
import java.util.Collections;
import java.util.Iterator;
+import java.util.List;
/**
* A Suite is a collection of Test Cases.
@@ -42,11 +43,14 @@
*/
public abstract class Suite<T extends Test> extends Test implements Iterable<T> {
- /** The Tests contained in this Suite. */
+ /**
+ * The Tests contained in this Suite.
+ */
private final List<T> tests = new ArrayList<T>();
/**
* Creates a Suite.
+ *
* @param name Name of this Suite.
*/
protected Suite(@NotNull final String name) {
@@ -55,6 +59,7 @@
/**
* Returns the global variable name of this Suite.
+ *
* @return The global variable name of this Suite.
*/
public String getGlobalVariableName() {
@@ -68,7 +73,6 @@
*/
public abstract boolean containsTests();
- /** {@inheritDoc} */
@Override
public void setId(@NotNull final IdGenerator generator) throws IllegalStateException {
super.setId(generator);
@@ -94,6 +98,7 @@
/**
* Returns an iterable of contained tests.
+ *
* @return An iterable of contained tests.
*/
public List<T> getTests() {
@@ -102,13 +107,14 @@
/**
* Adds a Test to this Suite.
+ *
* @param test Test to add.
*/
public void add(@NotNull final T test) {
tests.add(test);
}
- /** {@inheritDoc} */
+ @Override
public Iterator<T> iterator() {
return tests.iterator();
}
Modified: trunk/src/java/src/prj/net/sf/aceunit/Test.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Test.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/Test.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -28,26 +28,34 @@
import org.jetbrains.annotations.NotNull;
-/** A test, which can be anything that actually is a Test.
+/**
+ * A test, which can be anything that actually is a Test.
+ *
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public abstract class Test {
- /** The name of this Test. */
+ /**
+ * The name of this Test.
+ */
private final String name;
-
- /** The id of this Test. */
+ /**
+ * The id of this Test.
+ */
private int id;
/**
* Creates a Test.
+ *
* @param name The name of this test.
*/
protected Test(@NotNull final String name) {
this.name = name;
}
- /** Returns the name of this test.
+ /**
+ * Returns the name of this test.
+ *
* @return The name of this test.
*/
public String getName() {
@@ -58,7 +66,6 @@
* Returns the id of this Test.
*
* @return The id of this Test.
- *
* @throws IllegalStateException in case the id is not yet set.
*/
public int getId() throws IllegalStateException {
Modified: trunk/src/java/src/prj/net/sf/aceunit/TestCase.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/TestCase.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/prj/net/sf/aceunit/TestCase.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -28,7 +28,9 @@
import org.jetbrains.annotations.NotNull;
-/** A TestCase.
+/**
+ * A TestCase.
+ *
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public class TestCase extends Test {
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java 2013-12-16 06:06:48 UTC (rev 581)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java 2013-12-16 06:08:57 UTC (rev 582)
@@ -27,411 +27,548 @@
package test.net.sf.aceunit;
+import net.sf.aceunit.CommentToWhitespaceReader;
+import org.jetbrains.annotations.NotNull;
+import org.junit.Assert;
import org.junit.Test;
-import org.junit.Assert;
-import org.jetbrains.annotations.NotNull;
+
+import java.io.IOException;
import java.io.StringReader;
-import java.io.IOException;
-import net.sf.aceunit.CommentToWhitespaceReader;
-/** Tests that NoCommentReader replaces comments with whitespace.
+/**
+ * Tests that NoCommentReader replaces comments with whitespace.
+ *
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
* @see <a href="https://sourceforge.net/tracker/index.php?func=detail&aid=1864061&group_id=207094&atid=1000227">[ 1864061 ] Java Generator does not recognize comments -> linker problem</a>
*/
public class CommentToWhitespaceReaderTest {
- /** Tests that for source code without comments, that source code is returned unmodified.
+ /**
+ * Tests that for source code without comments, that source code is returned unmodified.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void simpleLF() throws IOException {
+ @Test
+ public void simpleLF() throws IOException {
final String orig = "void foo() {\n bar();\n}\n";
assertReplacement(orig, orig);
}
- /** Tests that for source code without comments, that source code is returned unmodified.
+ /**
+ * Tests that for source code without comments, that source code is returned unmodified.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void simpleCR() throws IOException {
+ @Test
+ public void simpleCR() throws IOException {
final String orig = "void foo() {\r bar();\r}\r";
assertReplacement(orig, orig);
}
- /** Tests that for source code without comments, that source code is returned unmodified.
+ /**
+ * Tests that for source code without comments, that source code is returned unmodified.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void simpleCRLF() throws IOException {
+ @Test
+ public void simpleCRLF() throws IOException {
final String orig = "void foo() {\r\n bar();\r\n}\r\n";
assertReplacement(orig, orig);
}
- /** Tests that EOL comments are properly replaced by whitespace.
+ /**
+ * Tests that EOL comments are properly replaced by whitespace.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void eolCommentsLF() throws IOException {
+ @Test
+ public void eolCommentsLF() throws IOException {
final String orig = "void foo() { // comment\n bar(); // comment\n} // comment\n";
- final String exp = "void foo() { \n bar(); \n} \n";
+ final String exp = "void foo() { \n bar(); \n} \n";
assertReplacement(orig, exp);
}
- /** Tests that EOL comments are properly replaced by whitespace.
+ /**
+ * Tests that EOL comments are properly replaced by whitespace.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void eolCommentsCR() throws IOException {
+ @Test
+ public void eolCommentsCR() throws IOException {
final String orig = "void foo() { // comment\r bar(); // comment\r} // comment\r";
- final String exp = "void foo() { \r bar(); \r} \r";
+ final String exp = "void foo() { \r bar(); \r} \r";
assertReplacement(orig, exp);
}
- /** Tests that EOL comments are properly replaced by whitespace.
+ /**
+ * Tests that EOL comments are properly replaced by whitespace.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void eolCommentsCRLF() throws IOException {
+ @Test
+ public void eolCommentsCRLF() throws IOException {
final String orig = "void foo() { // comment\r\n bar(); // comment\r\n} // comment\r\n";
- final String exp = "void foo() { \r\n bar(); \r\n} \r\n";
+ final String exp = "void foo() { \r\n bar(); \r\n} \r\n";
assertReplacement(orig, exp);
}
- /** Tests that multiline comments on a single line are properly replaced by whitespace.
+ /**
+ * Tests that multiline comments on a single line are properly replaced by whitespace.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void multilineCommentsLF() throws IOException {
+ @Test
+ public void multilineCommentsLF() throws IOException {
final String orig = "void foo() { /* comment */\n bar(); /* comment */\n} /* comment */\n";
- final String exp = "void foo() { \n bar(); \n} \n";
+ final String exp = "void foo() { \n bar(); \n} \n";
assertReplacement(orig, exp);
}
- /** Tests that multiline comments on a single line are properly replaced by whitespace.
+ /**
+ * Tests that multiline comments on a single line are properly replaced by whitespace.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void multilineCommentsCR() throws IOException {
+ @Test
+ public void multilineCommentsCR() throws IOException {
final String orig = "void foo() { /* comment */\r bar(); /* comment */\r} /* comment */\r";
- final String exp = "void foo() { \r bar(); \r} \r";
+ final String exp = "void foo() { \r bar(); \r} \r";
assertReplacement(orig, exp);
}
- /** Tests that multiline comments on a single line are properly replaced by whitespace.
+ /**
+ * Tests that multiline comments on a single line are properly replaced by whitespace.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void multilineCommentsCRLF() throws IOException {
+ @Test
+ public void multilineCommentsCRLF() throws IOException {
final String orig = "void foo() { /* comment */\r\n bar(); /* comment */\r\n} /* comment */\r\n";
- final String exp = "void foo() { \r\n bar(); \r\n} \r\n";
+ final String exp = "void foo() { \r\n bar(); \r\n} \r\n";
assertReplacement(orig, exp);
}
- /** Tests that a String that contains text like an EOL comment is retained as String.
+ /**
+ * Tests that a String that contains text like an EOL comment is retained as String.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void pseudoEolCommentInStringLF() throws IOException {
+ @Test
+ public void pseudoEolCommentInStringLF() throws IOException {
final String orig = "void foo() {\n printf(\"// pseudo comment\");\n}\n";
assertReplacement(orig, orig);
}
- /** Tests that a String that contains text like an EOL comment is retained as String.
+ /**
+ * Tests that a String that contains text like an EOL comment is retained as String.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void pseudoEolCommentInStringCR() throws IOException {
+ @Test
+ public void pseudoEolCommentInStringCR() throws IOException {
final String orig = "void foo() {\r printf(\"// pseudo comment\");\r}\r";
assertReplacement(orig, orig);
}
- /** Tests that a String that contains text like an EOL comment is retained as String.
+ /**
+ * Tests that a String that contains text like an EOL comment is retained as String.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void pseudoEolCommentInStringCRLF() throws IOException {
+ @Test
+ public void pseudoEolCommentInStringCRLF() throws IOException {
final String orig = "void foo() {\r\n printf(\"// pseudo comment\");\r\n}\r\n";
assertReplacement(orig, orig);
}
- /** Tests that a String that contains text like a multiline comment is retained as String.
+ /**
+ * Tests that a String that contains text like a multiline comment is retained as String.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void pseudoMultilineCommentInStringLF() throws IOException {
+ @Test
+ public void pseudoMultilineCommentInStringLF() throws IOException {
final String orig = "void foo() {\n printf(\"/* pseudo comment */\");\n}\n";
assertReplacement(orig, orig);
}
- /** Tests that a String that contains text like a multiline comment is retained as String.
+ /**
+ * Tests that a String that contains text like a multiline comment is retained as String.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void pseudoMultilineCommentInStringCR() throws IOException {
+ @Test
+ public void pseudoMultilineCommentInStringCR() throws IOException {
final String orig = "void foo() {\r printf(\"/* pseudo comment */\");\r}\r";
assertReplacement(orig, orig);
}
- /** Tests that a String that contains text like a multiline comment is retained as String.
+ /**
+ * Tests that a String that contains text like a multiline comment is retained as String.
+ *
* @throws IOException In case of I/O problems (unexpected).
*/
- @Test public void pseudoMultilineCommentInStringCRLF() throws IOException {
+ @Test
+ public void pseudoMultilineCommentInSt...
[truncated message content] |
|
From: <chr...@us...> - 2013-12-16 06:06:52
|
Revision: 581
http://sourceforge.net/p/aceunit/code/581
Author: christianhujer
Date: 2013-12-16 06:06:48 +0000 (Mon, 16 Dec 2013)
Log Message:
-----------
[Test] Use gcc on-the-fly generation of dependency files.
Modified Paths:
--------------
trunk/src/native/test/common.mak
Modified: trunk/src/native/test/common.mak
===================================================================
--- trunk/src/native/test/common.mak 2011-03-27 21:28:13 UTC (rev 580)
+++ trunk/src/native/test/common.mak 2013-12-16 06:06:48 UTC (rev 581)
@@ -19,7 +19,7 @@
LINT:=splint
-CPPFLAGS:=-DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" -I . -I $(ACEUNIT_NATIVE_PATH)
+CPPFLAGS:=-MMD -DACEUNIT_CONFIG_FILE=\"AceUnitConfig.h\" -I . -I $(ACEUNIT_NATIVE_PATH)
C_and_LD_FLAGS:=-fprofile-arcs
CFLAGS?=-fdiagnostics-show-option -std=$(CVERSION) -pedantic $(C_and_LD_FLAGS) -ftest-coverage -W -Wall -g
CXXFLAGS?=-fdiagnostics-show-option -pedantic $(C_and_LD_FLAGS) -ftest-coverage -W -Wall -g
@@ -35,8 +35,8 @@
$(ACEUNIT_JAVA_PATH)/AceUnit.jar: $(ACEUNIT_JAVA_SRC)
ant -f $(ACEUNIT_JAVA_PATH)/build.xml
-%.d: %.c
- $(CPP) -M -MM -MG $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
+#%.d: %.c
+# $(CPP) -M -MM -MG $(CPPFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
coverage: test
gcov *.c
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-03-27 21:28:19
|
Revision: 580
http://aceunit.svn.sourceforge.net/aceunit/?rev=580&view=rev
Author: christianhujer
Date: 2011-03-27 21:28:13 +0000 (Sun, 27 Mar 2011)
Log Message:
-----------
Improve Makefile of the sort example.
Modified Paths:
--------------
trunk/src/doc/examples/sort/Makefile
Modified: trunk/src/doc/examples/sort/Makefile
===================================================================
--- trunk/src/doc/examples/sort/Makefile 2011-03-26 22:27:01 UTC (rev 579)
+++ trunk/src/doc/examples/sort/Makefile 2011-03-27 21:28:13 UTC (rev 580)
@@ -1,10 +1,30 @@
-ACE_UNIT_PATH=../../..
+# Path to AceUnit.
+# Scope: local.
+# Type: Single path.
+ACE_UNIT_PATH:=../../..
+
+# List of generated files.
+# As a side effect, runs the AceUnit generator.
+# Scope: local.
+# Type: List of pathnames.
GENERATED_FILES:=$(shell java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar --print suites,headers .)
+
+# List of source files.
+# Scope: local.
+# Type: List of scource files.
SOURCES:=AceUnitMain.c AceUnit.c AceUnitData.c FullPlainLogger.c $(wildcard *.c) $(filter %.c, $(GENERATED_FILES))
-CFLAGS=-W -Wall -pedantic
-CPPFLAGS=-DACEUNIT_SUITES -I $(ACE_UNIT_PATH)/native
+## Flags for the C compiler.
+# Scope: External
+# Type: Flags passed to the C compiler.
+override CFLAGS+=-W -Wall -pedantic
+## Flags for the C preprocessor.
+# Scope: External.
+# Type: Flags passed to all programs that do C preprocessing.
+override CPPFLAGS+=-DACEUNIT_SUITES -I $(ACE_UNIT_PATH)/native
+
+# Sets the path where to find C source files.
vpath %.c . $(ACE_UNIT_PATH)/native $(ACE_UNIT_PATH)/native/loggers
all: AceUnitMain
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-03-26 22:27:08
|
Revision: 579
http://aceunit.svn.sourceforge.net/aceunit/?rev=579&view=rev
Author: christianhujer
Date: 2011-03-26 22:27:01 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Remove TODO. I will not care about the last comma for stupid standards-violating compilers until someone really requires it.
Modified Paths:
--------------
trunk/src/java/src/prj/net/sf/aceunit/Fixture.java
Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2011-03-26 22:14:31 UTC (rev 578)
+++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2011-03-26 22:27:01 UTC (rev 579)
@@ -174,7 +174,7 @@
out.format("/** The loops of this fixture. */%n");
out.format("static const aceunit_loop_t loops[] = {%n");
for (final String method : testMethods) {
- out.format(" %s,%n", loopMethods.getArg(method)); // TODO Care about last comma?
+ out.format(" %s,%n", loopMethods.getArg(method));
}
out.format("};%n");
out.format("#endif%n");
@@ -183,7 +183,7 @@
out.format("/** The groups of this fixture. */%n");
out.format("static const AceGroupId_t groups[] = {%n");
for (final String method : testMethods) {
- out.format(" %s,%n", groupMethods.getArg(method)); // TODO Care about last comma?
+ out.format(" %s,%n", groupMethods.getArg(method));
}
out.format("};%n");
out.format("#endif%n");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-03-26 22:14:37
|
Revision: 578
http://aceunit.svn.sourceforge.net/aceunit/?rev=578&view=rev
Author: christianhujer
Date: 2011-03-26 22:14:31 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Enable all compiler warnings.
Modified Paths:
--------------
trunk/src/java/build.xml
Modified: trunk/src/java/build.xml
===================================================================
--- trunk/src/java/build.xml 2011-03-26 22:14:14 UTC (rev 577)
+++ trunk/src/java/build.xml 2011-03-26 22:14:31 UTC (rev 578)
@@ -53,6 +53,7 @@
<pathelement location="lib/annotations.jar" />
<pathelement location="lib/japi-lib-argparser-0.3.0.jar" />
</classpath>
+ <compilerarg value="-Xlint:all" />
</javac>
<copy todir="classes/production">
<fileset dir="src/prj">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-03-26 22:14:20
|
Revision: 577
http://aceunit.svn.sourceforge.net/aceunit/?rev=577&view=rev
Author: christianhujer
Date: 2011-03-26 22:14:14 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Fix compiler warnings found by JDK7.
Modified Paths:
--------------
trunk/src/java/src/prj/net/sf/aceunit/Pckg.java
Modified: trunk/src/java/src/prj/net/sf/aceunit/Pckg.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2011-03-26 22:09:37 UTC (rev 576)
+++ trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2011-03-26 22:14:14 UTC (rev 577)
@@ -36,7 +36,7 @@
*
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public class Pckg extends Suite<Suite> {
+public class Pckg extends Suite<Suite<?>> {
/**
* Creates a Pckg with the specified id.
@@ -49,7 +49,7 @@
/** {@inheritDoc} */
public boolean containsTests() {
boolean containsTests = false;
- for (final Suite suite : getTests()) {
+ for (final Suite<?> suite : getTests()) {
containsTests = containsTests || suite.containsTests();
}
return containsTests;
@@ -60,7 +60,7 @@
*
* @param suite Suite to add
*/
- public void addSuite(@NotNull final Suite suite) {
+ public void addSuite(@NotNull final Suite<?> suite) {
add(suite);
}
@@ -78,12 +78,12 @@
out.format("%n");
out.format("#ifdef ACEUNIT_SUITES%n");
out.format("%n");
- for (final Suite suite : getTests()) {
+ for (final Suite<?> suite : getTests()) {
out.format("extern TestSuite_t %s;%n", suite.getGlobalVariableName());
}
out.format("%n");
out.format("const TestSuite_t *suitesOf%d[] = {%n", getId());
- for (final Suite suite : getTests()) {
+ for (final Suite<?> suite : getTests()) {
out.format(" &%s,%n", suite.getGlobalVariableName());
}
out.format(" NULL%n");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-03-26 22:09:44
|
Revision: 576
http://aceunit.svn.sourceforge.net/aceunit/?rev=576&view=rev
Author: christianhujer
Date: 2011-03-26 22:09:37 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Fix several typos, misspellings and wrong words.
Modified Paths:
--------------
trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java
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/Pckg.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/CommentToWhitespaceReaderTest.java
trunk/src/java/src/tst/test/net/sf/aceunit/IdGeneratorTest.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/CommentToWhitespaceReader.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -65,10 +65,10 @@
/** A backslash was found, we are in escape mode. */
ESCAPE,
- /** An apostroph was found, we are inside a char literal. */
+ /** An apostrophe was found, we are inside a char literal. */
CHAR,
- /** A backslash was found inside a char literal, the next char will NOT end it even if it is an apostroph. */
+ /** A backslash was found inside a char literal, the next char will NOT end it even if it is an apostrophe. */
ESCAPE_IN_CHAR,
/** A double quote was found, we are inside a string literal. */
@@ -87,7 +87,7 @@
private State state = State.NORMAL;
/**
- * The cached character is used to return a char that can only be returned when its following char was konwn.
+ * The cached character is used to return a char that can only be returned when its following char was known.
* If this is <code>null</code>, there is no cached character.
*/
@Nullable
@@ -127,7 +127,7 @@
* Implementation of {@link #read()}.
*
* @return read character.
- * @throws IOException In caes of I/O problems.
+ * @throws IOException In case of I/O problems.
* @retval -1 in case of end of file.
* @retval -2 in case this function needs to be invoked again.
*/
@@ -270,7 +270,7 @@
}
/** {@inheritDoc} */
- public int read(@NotNull final char[] cbuf, final int off, final int len) throws IOException {
+ public int read(@NotNull final char[] charBuffer, final int off, final int len) throws IOException {
int i;
for (i = 0; i < len; i++) {
int c = read();
@@ -281,7 +281,7 @@
break;
}
}
- cbuf[off + i] = (char) c;
+ charBuffer[off + i] = (char) c;
}
return i;
}
Modified: trunk/src/java/src/prj/net/sf/aceunit/Fixture.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -116,22 +116,22 @@
/** {@inheritDoc} */
@NotNull
- public String getCode(@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("/** AceUnit test header file for fixture %s.%n", baseName);
out.format(" *%n");
out.format(" * You may wonder why this is a header file and yet generates program elements.%n");
out.format(" * This allows you to declare test methods as static.%n");
out.format(" *%n");
out.format(" * @warning This is a generated file. Do not edit. Your changes will be lost.%n");
- out.format(" * @file %s.h%n", basename);
+ out.format(" * @file %s.h%n", baseName);
out.format(" */%n");
out.format("%n");
- final String ucaseFixture = basename.toUpperCase();
- out.format("#ifndef _%s_H%n", ucaseFixture);
+ final String uppercaseFixture = baseName.toUpperCase();
+ out.format("#ifndef _%s_H%n", uppercaseFixture);
out.format("/** Include shield to protect this header file from being included more than once. */%n");
- out.format("#define _%s_H%n", ucaseFixture);
+ out.format("#define _%s_H%n", uppercaseFixture);
out.format("%n");
out.format("/** The id of this fixture. */%n");
@@ -207,7 +207,7 @@
out.format("const TestFixture_t %sFixture = {%n", getName());
out.format(" %d,%n", getId());
out.format("#ifndef ACEUNIT_EMBEDDED%n");
- out.format(" \"%s\",%n", basename);
+ out.format(" \"%s\",%n", baseName);
out.format("#endif%n");
out.format("#ifdef ACEUNIT_SUITES%n");
out.format(" NULL,%n");
@@ -230,12 +230,12 @@
out.format("};%n");
out.format("%n");
- out.format("#endif /* _%s_H */%n", ucaseFixture);
+ out.format("#endif /* _%s_H */%n", uppercaseFixture);
return out.toString();
}
/** {@inheritDoc} */
- @Override public String getGlobalVariablename() {
+ @Override public String getGlobalVariableName() {
return getName() + "Fixture";
}
Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -153,16 +153,16 @@
/**
* Performs the generation of tests.
*
- * @param basename Base name to generate tests for.
+ * @param baseName Base name to generate tests for.
* This may be a file when appending '.c' or a directory or both.
* If it is neither nor, an {@link IllegalArgumentException} is thrown.
* @return <code>true</code> if tests were found, otherwise <code>false</code>.
* @throws IOException In case of I/O problems.
- * @throws IllegalArgumentException in case <var>basename</var> is not a directory and no file <code><var>basename</var>.c</code> was found.
+ * @throws IllegalArgumentException in case <var>baseName</var> is not a directory and no file <code><var>baseName</var>.c</code> was found.
*/
- private boolean perform(@NotNull final String basename) throws IOException {
- final File baseDir = new File(basename);
- final File[] fixtureFiles = { new File(basename + ".c"), new File(basename + ".cpp") };
+ private boolean perform(@NotNull final String baseName) throws IOException {
+ final File baseDir = new File(baseName);
+ final File[] fixtureFiles = { new File(baseName + ".c"), new File(baseName + ".cpp") };
boolean baseFound = false;
boolean testsFound = false;
if (baseDir.isDirectory()) {
@@ -184,13 +184,13 @@
}
}
if (!baseFound) {
- System.err.println("AceUnit: " + basename + ": error: No such directory.");
- System.err.println("AceUnit: " + basename + ".c: error: No such file.");
- System.err.println("AceUnit: " + basename + ".cpp: error: No such file.");
+ System.err.println("AceUnit: " + baseName + ": error: No such directory.");
+ System.err.println("AceUnit: " + baseName + ".c: error: No such file.");
+ System.err.println("AceUnit: " + baseName + ".cpp: error: No such file.");
System.err.println("AceUnit: no input files");
}
if (!testsFound) {
- System.err.println("AceUnit: no test cases in " + basename);
+ System.err.println("AceUnit: no test cases in " + baseName);
}
return baseFound || testsFound;
}
@@ -210,7 +210,7 @@
* 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 parent Parent package of this package, <code>null</code> if toplevel.
+ * @param parent Parent package of this package, <code>null</code> if top-level.
* @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.
@@ -327,8 +327,8 @@
private void writeAllTests(@NotNull final PrintWriter out, @NotNull final Test test) throws IOException {
out.format("%d: %s%n", test.getId(), test.getName());
if (test instanceof Suite) {
- for (final Test subtest : ((Suite<Test>) test)) {
- writeAllTests(out, subtest);
+ for (final Test subTest : ((Suite<Test>) test)) {
+ writeAllTests(out, subTest);
}
}
}
@@ -340,8 +340,8 @@
return 1;
}
boolean okay = true;
- for (final String basename : args) {
- okay &= perform(basename);
+ for (final String baseName : args) {
+ okay &= perform(baseName);
}
writeAllTests();
if (!okay) {
Modified: trunk/src/java/src/prj/net/sf/aceunit/Pckg.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -66,12 +66,12 @@
/** {@inheritDoc} */
@NotNull
- public String getCode(@NotNull final String basename) {
+ public String getCode(@NotNull final String baseName) {
final Formatter out = new Formatter();
- out.format("/** AceUnit test header file for package %s.%n", basename);
+ out.format("/** AceUnit test header file for package %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(" * @file %s.h%n", baseName);
out.format(" */%n");
out.format("%n");
out.format("#include \"AceUnit.h\"%n");
@@ -79,12 +79,12 @@
out.format("#ifdef ACEUNIT_SUITES%n");
out.format("%n");
for (final Suite suite : getTests()) {
- out.format("extern TestSuite_t %s;%n", suite.getGlobalVariablename());
+ out.format("extern TestSuite_t %s;%n", suite.getGlobalVariableName());
}
out.format("%n");
out.format("const TestSuite_t *suitesOf%d[] = {%n", getId());
for (final Suite suite : getTests()) {
- out.format(" &%s,%n", suite.getGlobalVariablename());
+ out.format(" &%s,%n", suite.getGlobalVariableName());
}
out.format(" NULL%n");
out.format("};%n");
@@ -95,7 +95,7 @@
out.format("const TestSuite_t suite%d = {%n", getId());
out.format(" %d,%n", getId());
out.format("#ifndef ACEUNIT_EMBEDDED%n");
- out.format(" \"%s\",%n", basename);
+ out.format(" \"%s\",%n", baseName);
out.format("#endif%n");
out.format(" suitesOf%d%n", getId());
out.format("};%n");
Modified: trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -76,7 +76,7 @@
*/
private static boolean warned16RequiredForSetWritable;
- /** Utility class - do not instanciate. */
+ /** Utility class - do not instance. */
private SourceFiles() {
}
Modified: trunk/src/java/src/prj/net/sf/aceunit/Suite.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -57,14 +57,14 @@
* Returns the global variable name of this Suite.
* @return The global variable name of this Suite.
*/
- public String getGlobalVariablename() {
+ public String getGlobalVariableName() {
return "suite" + getId();
}
/**
* Returns whether this suite contains tests.
*
- * @return <code>true</code> if this fiture contains test cases, otherwise <code>false</code>.
+ * @return <code>true</code> if this fixture contains test cases, otherwise <code>false</code>.
*/
public abstract boolean containsTests();
@@ -75,7 +75,7 @@
// XXX:2009-08-16:christianhujer:For packages the id is set other than for fixtures.
// Of course it would be nicer to have it clean, and that's the plan.
// See the XXX comments in GenTest.java for more information.
- // Until then, the ugly instanceof is kept - the smell shouldn't be covered by a OO parfume.
+ // Until then, the ugly instanceof is kept - the smell shouldn't be covered by a OO perfume.
if (this instanceof Fixture) {
for (final T test : tests) {
test.setId(generator);
@@ -84,16 +84,16 @@
}
/**
- * Returns a String repsuites.size() > 0;C-Source code for this Suite.
+ * Returns a String with the C-Source code for this Suite.
*
- * @param basename Base name of this Suite.
+ * @param baseName Base name of this Suite.
* @return String with the C-Source for this Suite.
*/
@NotNull
- public abstract String getCode(@NotNull final String basename);
+ public abstract String getCode(@NotNull final String baseName);
/**
- * Returns an iteratable of contained tests.
+ * Returns an iterable of contained tests.
* @return An iterable of contained tests.
*/
public List<T> getTests() {
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -69,8 +69,8 @@
*/
@Test public void eolCommentsLF() throws IOException {
final String orig = "void foo() { // comment\n bar(); // comment\n} // comment\n";
- final String expe = "void foo() { \n bar(); \n} \n";
- assertReplacement(orig, expe);
+ final String exp = "void foo() { \n bar(); \n} \n";
+ assertReplacement(orig, exp);
}
/** Tests that EOL comments are properly replaced by whitespace.
@@ -78,8 +78,8 @@
*/
@Test public void eolCommentsCR() throws IOException {
final String orig = "void foo() { // comment\r bar(); // comment\r} // comment\r";
- final String expe = "void foo() { \r bar(); \r} \r";
- assertReplacement(orig, expe);
+ final String exp = "void foo() { \r bar(); \r} \r";
+ assertReplacement(orig, exp);
}
/** Tests that EOL comments are properly replaced by whitespace.
@@ -87,8 +87,8 @@
*/
@Test public void eolCommentsCRLF() throws IOException {
final String orig = "void foo() { // comment\r\n bar(); // comment\r\n} // comment\r\n";
- final String expe = "void foo() { \r\n bar(); \r\n} \r\n";
- assertReplacement(orig, expe);
+ final String exp = "void foo() { \r\n bar(); \r\n} \r\n";
+ assertReplacement(orig, exp);
}
/** Tests that multiline comments on a single line are properly replaced by whitespace.
@@ -96,8 +96,8 @@
*/
@Test public void multilineCommentsLF() throws IOException {
final String orig = "void foo() { /* comment */\n bar(); /* comment */\n} /* comment */\n";
- final String expe = "void foo() { \n bar(); \n} \n";
- assertReplacement(orig, expe);
+ final String exp = "void foo() { \n bar(); \n} \n";
+ assertReplacement(orig, exp);
}
/** Tests that multiline comments on a single line are properly replaced by whitespace.
@@ -105,8 +105,8 @@
*/
@Test public void multilineCommentsCR() throws IOException {
final String orig = "void foo() { /* comment */\r bar(); /* comment */\r} /* comment */\r";
- final String expe = "void foo() { \r bar(); \r} \r";
- assertReplacement(orig, expe);
+ final String exp = "void foo() { \r bar(); \r} \r";
+ assertReplacement(orig, exp);
}
/** Tests that multiline comments on a single line are properly replaced by whitespace.
@@ -114,15 +114,15 @@
*/
@Test public void multilineCommentsCRLF() throws IOException {
final String orig = "void foo() { /* comment */\r\n bar(); /* comment */\r\n} /* comment */\r\n";
- final String expe = "void foo() { \r\n bar(); \r\n} \r\n";
- assertReplacement(orig, expe);
+ final String exp = "void foo() { \r\n bar(); \r\n} \r\n";
+ assertReplacement(orig, exp);
}
/** Tests that a String that contains text like an EOL comment is retained as String.
* @throws IOException In case of I/O problems (unexpected).
*/
@Test public void pseudoEolCommentInStringLF() throws IOException {
- final String orig = "void foo() {\n printf(\"// pseudocomment\");\n}\n";
+ final String orig = "void foo() {\n printf(\"// pseudo comment\");\n}\n";
assertReplacement(orig, orig);
}
@@ -130,7 +130,7 @@
* @throws IOException In case of I/O problems (unexpected).
*/
@Test public void pseudoEolCommentInStringCR() throws IOException {
- final String orig = "void foo() {\r printf(\"// pseudocomment\");\r}\r";
+ final String orig = "void foo() {\r printf(\"// pseudo comment\");\r}\r";
assertReplacement(orig, orig);
}
@@ -138,7 +138,7 @@
* @throws IOException In case of I/O problems (unexpected).
*/
@Test public void pseudoEolCommentInStringCRLF() throws IOException {
- final String orig = "void foo() {\r\n printf(\"// pseudocomment\");\r\n}\r\n";
+ final String orig = "void foo() {\r\n printf(\"// pseudo comment\");\r\n}\r\n";
assertReplacement(orig, orig);
}
@@ -146,7 +146,7 @@
* @throws IOException In case of I/O problems (unexpected).
*/
@Test public void pseudoMultilineCommentInStringLF() throws IOException {
- final String orig = "void foo() {\n printf(\"/* pseudocomment */\");\n}\n";
+ final String orig = "void foo() {\n printf(\"/* pseudo comment */\");\n}\n";
assertReplacement(orig, orig);
}
@@ -154,7 +154,7 @@
* @throws IOException In case of I/O problems (unexpected).
*/
@Test public void pseudoMultilineCommentInStringCR() throws IOException {
- final String orig = "void foo() {\r printf(\"/* pseudocomment */\");\r}\r";
+ final String orig = "void foo() {\r printf(\"/* pseudo comment */\");\r}\r";
assertReplacement(orig, orig);
}
@@ -162,7 +162,7 @@
* @throws IOException In case of I/O problems (unexpected).
*/
@Test public void pseudoMultilineCommentInStringCRLF() throws IOException {
- final String orig = "void foo() {\r\n printf(\"/* pseudocomment */\");\r\n}\r\n";
+ final String orig = "void foo() {\r\n printf(\"/* pseudo comment */\");\r\n}\r\n";
assertReplacement(orig, orig);
}
@@ -228,8 +228,8 @@
*/
@Test public void eolCommentAtStartLF() throws IOException {
final String orig = "/* foo\n * bar\n *\n */\n\nextern void foo();\n";
- final String expe = " \n \n \n \n\nextern void foo();\n";
- assertReplacement(orig, expe);
+ final String exp = " \n \n \n \n\nextern void foo();\n";
+ assertReplacement(orig, exp);
}
/** Tests that a multiline comment at the start of the text is replaced by whitespace.
@@ -237,8 +237,8 @@
*/
@Test public void eolCommentAtStartCR() throws IOException {
final String orig = "/* foo\r * bar\r *\r */\r\rextern void foo();\r";
- final String expe = " \r \r \r \r\rextern void foo();\r";
- assertReplacement(orig, expe);
+ final String exp = " \r \r \r \r\rextern void foo();\r";
+ assertReplacement(orig, exp);
}
/** Tests that a multiline comment at the start of the text is replaced by whitespace.
@@ -246,8 +246,8 @@
*/
@Test public void eolCommentAtStartCRLF() throws IOException {
final String orig = "/* foo\r\n * bar\r\n *\r\n */\r\n\r\nextern void foo();\r\n";
- final String expe = " \r\n \r\n \r\n \r\n\r\nextern void foo();\r\n";
- assertReplacement(orig, expe);
+ final String exp = " \r\n \r\n \r\n \r\n\r\nextern void foo();\r\n";
+ assertReplacement(orig, exp);
}
/** Tests that consecutive single line comments at the start of the text are replaced by whitespace.
@@ -255,8 +255,8 @@
*/
@Test public void multilineCommentAtStartLF() throws IOException {
final String orig = "// foo\n// bar\n// bazz\nextern void foo();\n";
- final String expe = " \n \n \nextern void foo();\n";
- assertReplacement(orig, expe);
+ final String exp = " \n \n \nextern void foo();\n";
+ assertReplacement(orig, exp);
}
/** Tests that consecutive single line comments at the start of the text are replaced by whitespace.
@@ -264,8 +264,8 @@
*/
@Test public void multilineCommentAtStartCR() throws IOException {
final String orig = "// foo\r// bar\r// bazz\rextern void foo();\r";
- final String expe = " \r \r \rextern void foo();\r";
- assertReplacement(orig, expe);
+ final String exp = " \r \r \rextern void foo();\r";
+ assertReplacement(orig, exp);
}
/** Tests that consecutive single line comments at the start of the text are replaced by whitespace.
@@ -273,8 +273,8 @@
*/
@Test public void multilineCommentAtStartCRLF() throws IOException {
final String orig = "// foo\r\n// bar\r\n// bazz\r\nextern void foo();\r\n";
- final String expe = " \r\n \r\n \r\nextern void foo();\r\n";
- assertReplacement(orig, expe);
+ final String exp = " \r\n \r\n \r\nextern void foo();\r\n";
+ assertReplacement(orig, exp);
}
/** Tests that an incomplete last line works.
@@ -283,8 +283,8 @@
*/
@Test public void incompleteLastLine() throws IOException {
final String orig = "void foo() { }";
- final String expe = "void foo() { }";
- assertReplacement(orig, expe);
+ final String exp = "void foo() { }";
+ assertReplacement(orig, exp);
}
/** Tests that an incomplete last line with multiline comment works.
@@ -293,8 +293,8 @@
*/
@Test public void incompleteLastLineWithMultilineComment() throws IOException {
final String orig = "/* foo */";
- final String expe = " ";
- assertReplacement(orig, expe);
+ final String exp = " ";
+ assertReplacement(orig, exp);
}
/** Tests that an incomplete last line with EOL comment works.
@@ -303,8 +303,8 @@
*/
@Test public void incompleteLastLineWithEOLComment() throws IOException {
final String orig = "// foo";
- final String expe = " ";
- assertReplacement(orig, expe);
+ final String exp = " ";
+ assertReplacement(orig, exp);
}
/** Tests that an incomplete multiline comment works.
@@ -313,8 +313,8 @@
*/
@Test public void incompleteMultilineComment() throws IOException {
final String orig = "/* ";
- final String expe = " ";
- assertReplacement(orig, expe);
+ final String exp = " ";
+ assertReplacement(orig, exp);
}
/** Tests that an incomplete multiline comment works.
@@ -323,8 +323,8 @@
*/
@Test public void incompleteString() throws IOException {
final String orig = "\"xxx";
- final String expe = "\"xxx";
- assertReplacement(orig, expe);
+ final String exp = "\"xxx";
+ assertReplacement(orig, exp);
}
/** Tests that an incomplete multiline comment works.
@@ -333,8 +333,8 @@
*/
@Test public void incompleteChar() throws IOException {
final String orig = "'x";
- final String expe = "'x";
- assertReplacement(orig, expe);
+ final String exp = "'x";
+ assertReplacement(orig, exp);
}
/** Tests that an incomplete multiline comment works.
@@ -343,8 +343,8 @@
*/
@Test public void incompleteEscape() throws IOException {
final String orig = "\\";
- final String expe = "\\";
- assertReplacement(orig, expe);
+ final String exp = "\\";
+ assertReplacement(orig, exp);
}
/** Tests that stars in multiline comments do not cause problems.
@@ -352,8 +352,8 @@
*/
@Test public void starsInMultilineComment() throws IOException {
final String orig = "foo/***/foo";
- final String expe = "foo foo";
- assertReplacement(orig, expe);
+ final String exp = "foo foo";
+ assertReplacement(orig, exp);
}
/** Tests that a slash in the next line does not terminate a multiline comment.
@@ -361,8 +361,8 @@
*/
@Test public void slashInNextLineDoesNotTerminateLF() throws IOException {
final String orig = "foo/*\n/*/bar/**\n/*/";
- final String expe = "foo \n bar \n ";
- assertReplacement(orig, expe);
+ final String exp = "foo \n bar \n ";
+ assertReplacement(orig, exp);
}
/** Tests that a slash in the next line does not terminate a multiline comment.
@@ -370,8 +370,8 @@
*/
@Test public void slashInNextLineDoesNotTerminateCR() throws IOException {
final String orig = "foo/*\r/*/bar/**\r/*/";
- final String expe = "foo \r bar \r ";
- assertReplacement(orig, expe);
+ final String exp = "foo \r bar \r ";
+ assertReplacement(orig, exp);
}
/** Tests that a slash in the next line does not terminate a multiline comment.
@@ -379,8 +379,8 @@
*/
@Test public void slashInNextLineDoesNotTerminateCRLF() throws IOException {
final String orig = "foo/*\r\n/*/bar/**\r\n/*/";
- final String expe = "foo \r\n bar \r\n ";
- assertReplacement(orig, expe);
+ final String exp = "foo \r\n bar \r\n ";
+ assertReplacement(orig, exp);
}
/** Tests that escapes in Strings work.
@@ -388,8 +388,8 @@
*/
@Test public void escapeInString() throws IOException {
final String orig = "foo\"\\\"\\/\"bar";
- final String expe = "foo\"\\\"\\/\"bar";
- assertReplacement(orig, expe);
+ final String exp = "foo\"\\\"\\/\"bar";
+ assertReplacement(orig, exp);
}
/** Tests that escapes in Characters work.
@@ -398,8 +398,8 @@
*/
@Test public void escapeInCharacter() throws IOException {
final String orig = "foo\'\\\'\\/\'bar";
- final String expe = "foo\'\\\'\\/\'bar";
- assertReplacement(orig, expe);
+ final String exp = "foo\'\\\'\\/\'bar";
+ assertReplacement(orig, exp);
}
/** Tests that a backslash at the end of a end of line comment continues the comment.
@@ -407,8 +407,8 @@
*/
@Test public void backslashAtEOLCommentContinuesLF() throws IOException {
final String orig = "foo //comment\\\ncomment";
- final String expe = "foo \n ";
- assertReplacement(orig, expe);
+ final String exp = "foo \n ";
+ assertReplacement(orig, exp);
}
/** Tests that a backslash at the end of a end of line comment continues the comment.
@@ -416,8 +416,8 @@
*/
@Test public void backslashAtEOLCommentContinuesCR() throws IOException {
final String orig = "foo //comment\\\rcomment";
- final String expe = "foo \r ";
- assertReplacement(orig, expe);
+ final String exp = "foo \r ";
+ assertReplacement(orig, exp);
}
/** Tests that a backslash at the end of a end of line comment continues the comment.
@@ -425,47 +425,47 @@
*/
@Test public void backslashAtEOLCommentContinuesCRLF() throws IOException {
final String orig = "foo //comment\\\r\ncomment";
- final String expe = "foo \r\n ";
- assertReplacement(orig, expe);
+ final String exp = "foo \r\n ";
+ assertReplacement(orig, exp);
}
- /** Asserts that when reading the String <var>orig</var> through a {@link CommentToWhitespaceReader}, <var>expe</var> is returned.
+ /** Asserts that when reading the String <var>orig</var> through a {@link CommentToWhitespaceReader}, <var>exp</var> is returned.
* @param orig Original String, will be passed through a {@link CommentToWhitespaceReader}.
- * @param expe Expected String, will be compared to the result of passing <var>orig</var> through a {@link CommentToWhitespaceReader}.
+ * @param exp Expected String, will be compared to the result of passing <var>orig</var> through a {@link CommentToWhitespaceReader}.
* @throws IOException In case of I/O problems (unexpected).
*/
- public void assertReplacement(@NotNull final String orig, @NotNull final String expe) throws IOException {
- assertReplacementSingle(orig, expe);
- assertReplacementBlock(orig, expe);
+ public void assertReplacement(@NotNull final String orig, @NotNull final String exp) throws IOException {
+ assertReplacementSingle(orig, exp);
+ assertReplacementBlock(orig, exp);
}
- /** Asserts that when reading the String <var>orig</var> through a {@link CommentToWhitespaceReader}, <var>expe</var> is returned.
+ /** Asserts that when reading the String <var>orig</var> through a {@link CommentToWhitespaceReader}, <var>exp</var> is returned.
* @param orig Original String, will be passed through a {@link CommentToWhitespaceReader}.
- * @param expe Expected String, will be compared to the result of passing <var>orig</var> through a {@link CommentToWhitespaceReader}.
+ * @param exp Expected String, will be compared to the result of passing <var>orig</var> through a {@link CommentToWhitespaceReader}.
* @throws IOException In case of I/O problems (unexpected).
*/
- public void assertReplacementSingle(@NotNull final String orig, @NotNull final String expe) throws IOException {
+ public void assertReplacementSingle(@NotNull final String orig, @NotNull final String exp) throws IOException {
final StringReader origReader = new StringReader(orig);
final CommentToWhitespaceReader reader = new CommentToWhitespaceReader(origReader);
final StringBuilder sb = new StringBuilder();
//noinspection StatementWithEmptyBody
for (int c; (c = reader.read()) != -1; sb.append((char) c));
- Assert.assertEquals(expe, sb.toString());
+ Assert.assertEquals(exp, sb.toString());
}
- /** Asserts that when reading the String <var>orig</var> through a {@link CommentToWhitespaceReader}, <var>expe</var> is returned.
+ /** Asserts that when reading the String <var>orig</var> through a {@link CommentToWhitespaceReader}, <var>exp</var> is returned.
* @param orig Original String, will be passed through a {@link CommentToWhitespaceReader}.
- * @param expe Expected String, will be compared to the result of passing <var>orig</var> through a {@link CommentToWhitespaceReader}.
+ * @param exp Expected String, will be compared to the result of passing <var>orig</var> through a {@link CommentToWhitespaceReader}.
* @throws IOException In case of I/O problems (unexpected).
*/
- public void assertReplacementBlock(@NotNull final String orig, @NotNull final String expe) throws IOException {
+ public void assertReplacementBlock(@NotNull final String orig, @NotNull final String exp) throws IOException {
final StringReader origReader = new StringReader(orig);
final CommentToWhitespaceReader reader = new CommentToWhitespaceReader(origReader);
final StringBuilder sb = new StringBuilder();
final char[] buf = new char[4096];
//noinspection StatementWithEmptyBody
for (int charsRead; (charsRead = reader.read(buf)) != -1; sb.append(buf, 0, charsRead));
- Assert.assertEquals(expe, sb.toString());
+ Assert.assertEquals(exp, sb.toString());
}
} // class CommentToWhitespaceReaderTest
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/IdGeneratorTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/IdGeneratorTest.java 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/IdGeneratorTest.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -14,10 +14,10 @@
/** Tests that IdGenerator returns distinct ids. */
@Test
public void testDistinct() {
- final IdGenerator testling = new IdGenerator();
+ final IdGenerator oUT = new IdGenerator();
final int[] testArray = new int[1000];
for (int i = 0; i < testArray.length; i++) {
- testArray[i] = testling.getNextId();
+ testArray[i] = oUT.getNextId();
}
Arrays.sort(testArray);
for (int i = 1; i < testArray.length; i++) {
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -47,17 +47,17 @@
/** Tests that {@link Pckg#addSuite(Suite)} works. */
@Test
public void testAdd() {
- final Pckg testling = new Pckg("dummy");
- Assert.assertFalse("After creation, a package is empty.", testling.containsTests());
+ final Pckg oUT = new Pckg("dummy");
+ Assert.assertFalse("After creation, a package is empty.", oUT.containsTests());
final Pckg pckg = new Pckg("dummy");
- testling.addSuite(pckg);
- Assert.assertFalse("After adding an empty package, a package is still empty.", testling.containsTests());
+ oUT.addSuite(pckg);
+ Assert.assertFalse("After adding an empty package, a package is still empty.", oUT.containsTests());
final Fixture emptyFixture = new Fixture(null, "");
pckg.addSuite(emptyFixture);
- Assert.assertFalse("After adding a fixture with no test cases, a package is still empty.", testling.containsTests());
+ Assert.assertFalse("After adding a fixture with no test cases, a package is still empty.", oUT.containsTests());
final Fixture fixture = new Fixture(null, "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());
+ Assert.assertTrue("After adding a fixture with test cases, a package is no longer empty.", oUT.containsTests());
}
} // 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 2011-03-26 21:51:59 UTC (rev 575)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2011-03-26 22:09:37 UTC (rev 576)
@@ -29,7 +29,6 @@
import net.sf.aceunit.Suite;
import org.junit.Test;
-import org.junit.Assert;
import org.jetbrains.annotations.NotNull;
/** UnitTest for {@link Suite}.
@@ -49,7 +48,7 @@
}
/** {@inheritDoc} */
@NotNull
- public String getCode(@NotNull final String basename) {
+ 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...> - 2011-03-26 21:52:05
|
Revision: 575
http://aceunit.svn.sourceforge.net/aceunit/?rev=575&view=rev
Author: christianhujer
Date: 2011-03-26 21:51:59 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Fix bug: Result of File.setWritable() was ignored.
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 2011-03-26 21:49:08 UTC (rev 574)
+++ trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2011-03-26 21:51:59 UTC (rev 575)
@@ -130,7 +130,9 @@
if (!file.canWrite()) {
getAnonymousLogger().info("Removing write protection from " + file);
try {
- file.setWritable(true);
+ if (!file.setWritable(true)) {
+ getAnonymousLogger().warning("Couldn't remove write protection from " + file);
+ }
} catch (final NoSuchMethodError e) {
if (!warned16RequiredForSetWritable) {
getAnonymousLogger().warning("Java 1.6 required for removing write protections.");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-03-26 21:49:14
|
Revision: 574
http://aceunit.svn.sourceforge.net/aceunit/?rev=574&view=rev
Author: christianhujer
Date: 2011-03-26 21:49:08 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Remove unused import.
Modified Paths:
--------------
trunk/src/java/src/prj/net/sf/aceunit/FileComparator.java
Modified: trunk/src/java/src/prj/net/sf/aceunit/FileComparator.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/FileComparator.java 2011-03-26 21:45:38 UTC (rev 573)
+++ trunk/src/java/src/prj/net/sf/aceunit/FileComparator.java 2011-03-26 21:49:08 UTC (rev 574)
@@ -29,7 +29,6 @@
import java.io.File;
import java.text.Collator;
-import java.util.Arrays;
import java.util.Comparator;
import java.util.Locale;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-03-26 21:45:44
|
Revision: 573
http://aceunit.svn.sourceforge.net/aceunit/?rev=573&view=rev
Author: christianhujer
Date: 2011-03-26 21:45:38 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Fix bug in regexp and javadoc.
Modified Paths:
--------------
trunk/src/java/src/prj/net/sf/aceunit/GenTest.java
Modified: trunk/src/java/src/prj/net/sf/aceunit/GenTest.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2011-03-26 21:45:13 UTC (rev 572)
+++ trunk/src/java/src/prj/net/sf/aceunit/GenTest.java 2011-03-26 21:45:38 UTC (rev 573)
@@ -134,7 +134,7 @@
/**
* Sets the locale for sorting files.
- * @param locale Locale for sorting files.
+ * @param fileSortingLocale Locale for sorting files.
*/
@Option({"locale"})
public void setFileSortingLocale(@NotNull final String fileSortingLocale) {
@@ -249,7 +249,7 @@
if (genSuites) {
SourceFiles.writeIfChanged(cFile, hSource, force);
}
- allTests.add(pckgDir.toString().replaceAll("^\\./", "").replaceAll("[\\/]", "."));
+ allTests.add(pckgDir.toString().replaceAll("^\\./", "").replaceAll("[\\\\/]", "."));
}
if (containedFixture && parent != null) {
parent.addSuite(pckg);
@@ -289,7 +289,7 @@
final String hSource = fixture.getCode(fixtureName);
SourceFiles.writeIfChanged(hFile, hSource, force);
pckg.addSuite(fixture);
- allTests.add(fixtureName.replaceAll("[\\/]", "."));
+ allTests.add(fixtureName.replaceAll("[\\\\/]", "."));
}
return containedFixture;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-03-26 21:45:19
|
Revision: 572
http://aceunit.svn.sourceforge.net/aceunit/?rev=572&view=rev
Author: christianhujer
Date: 2011-03-26 21:45:13 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Fix typo in javadoc.
Modified Paths:
--------------
trunk/src/java/src/prj/net/sf/aceunit/MethodList.java
Modified: trunk/src/java/src/prj/net/sf/aceunit/MethodList.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/MethodList.java 2011-03-26 21:44:51 UTC (rev 571)
+++ trunk/src/java/src/prj/net/sf/aceunit/MethodList.java 2011-03-26 21:45:13 UTC (rev 572)
@@ -213,7 +213,7 @@
}
/**
- * Returns the number of methods in this methodlist.
+ * Returns the number of methods in this method list.
*
* @return Number of methods in this method list.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-03-26 21:44:58
|
Revision: 571
http://aceunit.svn.sourceforge.net/aceunit/?rev=571&view=rev
Author: christianhujer
Date: 2011-03-26 21:44:51 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Fix typo in javadoc.
Modified Paths:
--------------
trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java
Modified: trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java 2011-02-16 22:45:50 UTC (rev 570)
+++ trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java 2011-03-26 21:44:51 UTC (rev 571)
@@ -39,7 +39,7 @@
*/
public class MethodList2 extends MethodList {
- /** The regular expression to use for fidning annotated methods. */
+ /** The regular expression to use for finding annotated methods. */
@NotNull private final Pattern pattern;
/** The arguments. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-16 22:45:56
|
Revision: 570
http://aceunit.svn.sourceforge.net/aceunit/?rev=570&view=rev
Author: christianhujer
Date: 2011-02-16 22:45:50 +0000 (Wed, 16 Feb 2011)
Log Message:
-----------
Add AUTHORS and CONTRIBUTORS files.
Added Paths:
-----------
trunk/AUTHORS
trunk/CONTRIBUTORS
Added: trunk/AUTHORS
===================================================================
--- trunk/AUTHORS (rev 0)
+++ trunk/AUTHORS 2011-02-16 22:45:50 UTC (rev 570)
@@ -0,0 +1,2 @@
+The following people have done the main development of AceUnit:
+* Christian Hujer <a href="mailto:ch...@ri...">Christian Hujer</a>
Property changes on: trunk/AUTHORS
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: trunk/CONTRIBUTORS
===================================================================
--- trunk/CONTRIBUTORS (rev 0)
+++ trunk/CONTRIBUTORS 2011-02-16 22:45:50 UTC (rev 570)
@@ -0,0 +1,5 @@
+The following people have contributed to AceUnit development.
+They've done patches, given feedback or written significant tracker items.
+* Anja Papatola
+* Christa Runge
+* Christian Doenges
Property changes on: trunk/CONTRIBUTORS
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-15 07:47:40
|
Revision: 569
http://aceunit.svn.sourceforge.net/aceunit/?rev=569&view=rev
Author: christianhujer
Date: 2011-02-15 07:47:34 +0000 (Tue, 15 Feb 2011)
Log Message:
-----------
Change test Makefile to work with new file structure.
Modified Paths:
--------------
trunk/src/native/test/common.mak
Modified: trunk/src/native/test/common.mak
===================================================================
--- trunk/src/native/test/common.mak 2011-02-15 07:46:59 UTC (rev 568)
+++ trunk/src/native/test/common.mak 2011-02-15 07:47:34 UTC (rev 569)
@@ -7,7 +7,7 @@
ACEUNIT_JAVA_SRC:=$(shell find $(ACEUNIT_JAVA_PATH)/src -name "*.java")
ACEUNIT_PARTS:=AceUnit AceUnitData $(LOGGER)
-VPATH=$(ACEUNIT_NATIVE_PATH)
+VPATH=$(ACEUNIT_NATIVE_PATH) $(ACEUNIT_NATIVE_PATH)/loggers
GENERATED:=$(shell java -ea -jar $(ACEUNIT_JAVA_PATH)/AceUnit.jar --exit true --print=generated $(ACEUNIT_OPTS) -o alltests.txt .)
SUITES:=$(filter *.c,$(GENERATED))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-15 07:47:05
|
Revision: 568
http://aceunit.svn.sourceforge.net/aceunit/?rev=568&view=rev
Author: christianhujer
Date: 2011-02-15 07:46:59 +0000 (Tue, 15 Feb 2011)
Log Message:
-----------
Make MiniRamLogger.c compile with C89 again.
Modified Paths:
--------------
trunk/src/native/loggers/MiniRamLogger.c
Modified: trunk/src/native/loggers/MiniRamLogger.c
===================================================================
--- trunk/src/native/loggers/MiniRamLogger.c 2011-02-15 07:46:17 UTC (rev 567)
+++ trunk/src/native/loggers/MiniRamLogger.c 2011-02-15 07:46:59 UTC (rev 568)
@@ -49,11 +49,11 @@
#endif
/** The number of valid logging elements in #data. */
-// Linkage note: RAM.
+/* Linkage note: RAM. */
size_t elementCount;
/** AceUnit Mini Ram Logger data buffer. */
-// Linkage note: RAM.
+/* Linkage note: RAM. */
AssertionError_t data[ACEUNIT_MINIRAM_LOGGER_BUFSIZE];
/** Initializes the Mini Ram Logger. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-15 07:46:23
|
Revision: 567
http://aceunit.svn.sourceforge.net/aceunit/?rev=567&view=rev
Author: christianhujer
Date: 2011-02-15 07:46:17 +0000 (Tue, 15 Feb 2011)
Log Message:
-----------
Fix include order because of size_t conflict.
Modified Paths:
--------------
trunk/src/native/loggers/MiniRamLogger.c
Modified: trunk/src/native/loggers/MiniRamLogger.c
===================================================================
--- trunk/src/native/loggers/MiniRamLogger.c 2011-02-15 00:11:52 UTC (rev 566)
+++ trunk/src/native/loggers/MiniRamLogger.c 2011-02-15 07:46:17 UTC (rev 567)
@@ -32,12 +32,6 @@
* @file MiniRamLogger.c
*/
-#include "AceUnit.h"
-#include "AceUnitLogging.h"
-#ifndef ACEUNIT_EMBEDDED
-#error "MiniRamLogger can only be used for ACEUNIT_EMBEDDED."
-#endif
-
#ifdef ACEUNIT_MINIRAMLOGGER_SAVE
#include <stdio.h>
#endif
@@ -48,6 +42,12 @@
#define ACEUNIT_MINIRAM_LOGGER_BUFSIZE 32
#endif
+#include "AceUnit.h"
+#include "AceUnitLogging.h"
+#ifndef ACEUNIT_EMBEDDED
+#error "MiniRamLogger can only be used for ACEUNIT_EMBEDDED."
+#endif
+
/** The number of valid logging elements in #data. */
// Linkage note: RAM.
size_t elementCount;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-15 00:11:58
|
Revision: 566
http://aceunit.svn.sourceforge.net/aceunit/?rev=566&view=rev
Author: christianhujer
Date: 2011-02-15 00:11:52 +0000 (Tue, 15 Feb 2011)
Log Message:
-----------
Allow AceUnitMain.c to be used w/o ACEUNIT_SUITES. In that case, it will be simply be empty.
Modified Paths:
--------------
trunk/src/native/AceUnitMain.c
Modified: trunk/src/native/AceUnitMain.c
===================================================================
--- trunk/src/native/AceUnitMain.c 2011-02-15 00:02:45 UTC (rev 565)
+++ trunk/src/native/AceUnitMain.c 2011-02-15 00:11:52 UTC (rev 566)
@@ -29,12 +29,10 @@
#include "AceUnit.h"
#include "AceUnitData.h"
-#ifndef ACEUNIT_SUITES
-#error Requires ACEUNIT_SUITES
-#endif
-
/** Main program for running AceUnit tests.
* Invokes the runner.
+ * It will only properly work if #ACEUNIT_SUITES is defined.
+ * If #ACEUNIT_SUITES is not defined, this file will effectively be empty.
*
* It supports two configuration parameters:
* <dl>
@@ -48,6 +46,8 @@
* @file AceUnitMain.c
*/
+#ifdef ACEUNIT_SUITES
+
#ifndef TEST_FAILURES_FOR_VERIFICATION
/** The number of test cases expected to fail.
* Defaults to 0.
@@ -76,3 +76,4 @@
#endif
return retVal;
}
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-15 00:02:51
|
Revision: 565
http://aceunit.svn.sourceforge.net/aceunit/?rev=565&view=rev
Author: christianhujer
Date: 2011-02-15 00:02:45 +0000 (Tue, 15 Feb 2011)
Log Message:
-----------
Simplify Makefile.
Modified Paths:
--------------
trunk/src/doc/examples/sort/Makefile
Modified: trunk/src/doc/examples/sort/Makefile
===================================================================
--- trunk/src/doc/examples/sort/Makefile 2011-02-14 21:47:09 UTC (rev 564)
+++ trunk/src/doc/examples/sort/Makefile 2011-02-15 00:02:45 UTC (rev 565)
@@ -1,29 +1,18 @@
ACE_UNIT_PATH=../../..
+GENERATED_FILES:=$(shell java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar --print suites,headers .)
+SOURCES:=AceUnitMain.c AceUnit.c AceUnitData.c FullPlainLogger.c $(wildcard *.c) $(filter %.c, $(GENERATED_FILES))
-ACE_UNIT_FILES=AceUnitMain.c AceUnit.c AceUnitData.c FullPlainLogger.c
+CFLAGS=-W -Wall -pedantic
+CPPFLAGS=-DACEUNIT_SUITES -I $(ACE_UNIT_PATH)/native
-FIXTURE_NAME=sortTest
-
vpath %.c . $(ACE_UNIT_PATH)/native $(ACE_UNIT_PATH)/native/loggers
-all: prepare compile
-
-clean:
- rm -f $(FIXTURE_NAME).h AceUnitMain *.o $(shell grep -Rl '@warning This is a generated file. Do not edit. Your changes will be lost.' --include="*.c" --include="*.h" .)
-
-test: all
+all: AceUnitMain
./AceUnitMain
-prepare: $(ACE_UNIT_PATH)/java/AceUnit.jar
- java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar .
+AceUnitMain: $(patsubst %.c,%.o,$(SOURCES))
-$(ACE_UNIT_PATH)/java/AceUnit.jar:
- (cd $(ACE_UNIT_PATH)/java ; ant)
+clean:
+ rm -f $(FIXTURE_NAME).h AceUnitMain *.o $(GENERATED_FILES)
-compile:
- make AceUnitMain
-
-CFLAGS=-W -Wall -pedantic
-CPPFLAGS=-DACEUNIT_SUITES -I $(ACE_UNIT_PATH)/native
-
-AceUnitMain: $(patsubst %.c,%.o,$(ACE_UNIT_FILES) $(wildcard *.c))
+$(GENERATED_FILES): ;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-14 21:47:15
|
Revision: 564
http://aceunit.svn.sourceforge.net/aceunit/?rev=564&view=rev
Author: christianhujer
Date: 2011-02-14 21:47:09 +0000 (Mon, 14 Feb 2011)
Log Message:
-----------
Fix bug: svn sandbox was broken by make clean.
Modified Paths:
--------------
trunk/src/doc/examples/sort/Makefile
Modified: trunk/src/doc/examples/sort/Makefile
===================================================================
--- trunk/src/doc/examples/sort/Makefile 2011-02-14 09:44:10 UTC (rev 563)
+++ trunk/src/doc/examples/sort/Makefile 2011-02-14 21:47:09 UTC (rev 564)
@@ -9,7 +9,7 @@
all: prepare compile
clean:
- rm -f $(FIXTURE_NAME).h AceUnitMain *.o $(shell grep -Rl '@warning This is a generated file. Do not edit. Your changes will be lost.' --exclude=Makefile .)
+ rm -f $(FIXTURE_NAME).h AceUnitMain *.o $(shell grep -Rl '@warning This is a generated file. Do not edit. Your changes will be lost.' --include="*.c" --include="*.h" .)
test: all
./AceUnitMain
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-14 09:44:19
|
Revision: 563
http://aceunit.svn.sourceforge.net/aceunit/?rev=563&view=rev
Author: christianhujer
Date: 2011-02-14 09:44:10 +0000 (Mon, 14 Feb 2011)
Log Message:
-----------
Bump Copyright.
Modified Paths:
--------------
trunk/LICENSE
trunk/src/doc/aceunitLogo.svg
trunk/src/doc/build.xml
trunk/src/doc/catalogForAnt.xml
trunk/src/doc/cleanupXhtml11.xslt
trunk/src/doc/examples/sort/sort.h
trunk/src/doc/examples/sort/sortTest.c
trunk/src/doc/transform.xslt
trunk/src/doc/xhtml2html.xslt
trunk/src/java/build.xml
trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java
trunk/src/java/src/prj/net/sf/aceunit/Fixture.java
trunk/src/java/src/prj/net/sf/aceunit/GenTest_de.properties
trunk/src/java/src/prj/net/sf/aceunit/MethodList.java
trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java
trunk/src/java/src/prj/net/sf/aceunit/Pckg.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/prj/net/sf/aceunit/Test.java
trunk/src/java/src/prj/net/sf/aceunit/TestCase.java
trunk/src/java/src/prj/net/sf/aceunit/package-info.java
trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java
trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java
trunk/src/java/src/tst/test/net/sf/aceunit/GenTestTest.java
trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java
trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java
trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java
trunk/src/java/src/tst/test/net/sf/aceunit/package-info.java
trunk/src/native/AceUnit.c
trunk/src/native/AceUnit.h
trunk/src/native/AceUnitAnnotations.h
trunk/src/native/AceUnitAssert.h
trunk/src/native/AceUnitData.c
trunk/src/native/AceUnitData.h
trunk/src/native/AceUnitLoggerStub.c
trunk/src/native/AceUnitLogging.h
trunk/src/native/AceUnitMain.c
trunk/src/native/AceUnitPrintf.c
trunk/src/native/ExceptionHandling.c
trunk/src/native/ExceptionHandling.h
trunk/src/native/loggers/FullPlainLogger.c
trunk/src/native/loggers/JUnitXmlLogger.c
trunk/src/native/loggers/MiniRamLogger.c
trunk/src/native/test/basic/AceUnitTest.c
trunk/src/native/test/basic/RunTests.c
trunk/src/native/test/basicEmbedded/AceUnitTest.c
trunk/src/native/test/basicEmbedded/RunTests.c
trunk/src/native/test/comment/CommentTest.c
trunk/src/native/test/comment/RunTests.c
trunk/src/native/test/cplusplus/AceUnitTest.c
trunk/src/native/test/cplusplus/RunTests.c
trunk/src/native/test/cplusplus2/AceUnitTest.c
trunk/src/native/test/cplusplus2/AceUnitTest2.cpp
trunk/src/native/test/explicitMsg/AceUnitTest.c
trunk/src/native/test/explicitMsg/RunTests.c
trunk/src/native/test/group/GroupTest.c
trunk/src/native/test/group/RunTests.c
trunk/src/native/test/longjmp/LongJmpTest.c
trunk/src/native/test/longjmp/RunTests.c
trunk/src/native/test/loop/AceUnitLoopTest.c
trunk/src/native/test/loop/RunTests.c
trunk/src/native/test/printf/AceUnitPrintfTest.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/C2/C2Mod1.c
trunk/src/native/test/recursive/C2/C2Mod2.c
trunk/src/native/test/recursive/C2/tests/Mod1/C2Mod1Test.c
trunk/src/native/test/recursive/C2/tests/Mod2/C2Mod2Test.c
trunk/src/native/test/twoFixtures/Fixture1.c
trunk/src/native/test/twoFixtures/Fixture2.c
trunk/src/native/test/twoFixtures/RunTests.c
trunk/src/native/test/xmlLog/RunTests.c
trunk/src/native/test/xmlLog/XmlLogTest.c
Modified: trunk/LICENSE
===================================================================
--- trunk/LICENSE 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/LICENSE 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-Copyright (c) 2007-2008, Christian Hujer
+Copyright (c) 2007-2011, Christian Hujer
All rights reserved.
Redistribution and use in source and binary forms, with or without
Modified: trunk/src/doc/aceunitLogo.svg
===================================================================
--- trunk/src/doc/aceunitLogo.svg 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/doc/aceunitLogo.svg 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (c) 2007, Christian Hujer
+ ~ Copyright (c) 2007 - 2011, Christian Hujer
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
Modified: trunk/src/doc/build.xml
===================================================================
--- trunk/src/doc/build.xml 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/doc/build.xml 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (c) 2007, Christian Hujer
+ ~ Copyright (c) 2007 - 2011, Christian Hujer
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
Modified: trunk/src/doc/catalogForAnt.xml
===================================================================
--- trunk/src/doc/catalogForAnt.xml 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/doc/catalogForAnt.xml 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (c) 2007, Christian Hujer
+ ~ Copyright (c) 2007 - 2011, Christian Hujer
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
Modified: trunk/src/doc/cleanupXhtml11.xslt
===================================================================
--- trunk/src/doc/cleanupXhtml11.xslt 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/doc/cleanupXhtml11.xslt 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (c) 2003 - 2007, Christian Hujer
+ ~ Copyright (c) 2003 - 2011, Christian Hujer
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
Modified: trunk/src/doc/examples/sort/sort.h
===================================================================
--- trunk/src/doc/examples/sort/sort.h 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/doc/examples/sort/sort.h 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/doc/examples/sort/sortTest.c
===================================================================
--- trunk/src/doc/examples/sort/sortTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/doc/examples/sort/sortTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/doc/transform.xslt
===================================================================
--- trunk/src/doc/transform.xslt 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/doc/transform.xslt 2011-02-14 09:44:10 UTC (rev 563)
@@ -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 - 2008 The AceUnit Developers. All Rights Reserved." />
+ <meta name="Copyright" content="Copyright © 2007 - 2011 The AceUnit Developers. All Rights Reserved." />
</xsl:if>
</xsl:template>
Modified: trunk/src/doc/xhtml2html.xslt
===================================================================
--- trunk/src/doc/xhtml2html.xslt 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/doc/xhtml2html.xslt 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
- ~ Copyright (c) 2007, Christian Hujer
+ ~ Copyright (c) 2007 - 2011, Christian Hujer
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
Modified: trunk/src/java/build.xml
===================================================================
--- trunk/src/java/build.xml 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/build.xml 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
- ~ Copyright (c) 2007, Christian Hujer
+ ~ Copyright (c) 2007 - 2011, 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/CommentToWhitespaceReader.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/CommentToWhitespaceReader.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, 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/Fixture.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/Fixture.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007 - 2008, Christian Hujer
+/* Copyright (c) 2007 - 2011, 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/GenTest_de.properties
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/GenTest_de.properties 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/GenTest_de.properties 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-# Copyright (c) 2007, Christian Hujer
+# Copyright (c) 2007 - 2011, 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/MethodList.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/MethodList.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/MethodList.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007 - 2008, Christian Hujer
+/* Copyright (c) 2007 - 2011, 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/MethodList2.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/MethodList2.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, 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/Pckg.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/Pckg.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, 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 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/SourceFiles.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007 - 2008, Christian Hujer
+/* Copyright (c) 2007 - 2011, 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 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/Suite.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007 - 2009, Christian Hujer
+/* Copyright (c) 2007 - 2011, 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/Test.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/Test.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/Test.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007 - 2009, Christian Hujer
+/* Copyright (c) 2007 - 2011, 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/TestCase.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/TestCase.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/TestCase.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007 - 2009, Christian Hujer
+/* Copyright (c) 2007 - 2011, 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/package-info.java
===================================================================
--- trunk/src/java/src/prj/net/sf/aceunit/package-info.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/prj/net/sf/aceunit/package-info.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/CommentToWhitespaceReaderTest.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/FixtureTest.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007 - 2008, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/GenTestTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/GenTestTest.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/GenTestTest.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/MethodListTest.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/PckgTest.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/SuiteTest.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/java/src/tst/test/net/sf/aceunit/package-info.java
===================================================================
--- trunk/src/java/src/tst/test/net/sf/aceunit/package-info.java 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/java/src/tst/test/net/sf/aceunit/package-info.java 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnit.c
===================================================================
--- trunk/src/native/AceUnit.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnit.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnit.h
===================================================================
--- trunk/src/native/AceUnit.h 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnit.h 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2008, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnitAnnotations.h
===================================================================
--- trunk/src/native/AceUnitAnnotations.h 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnitAnnotations.h 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnitAssert.h
===================================================================
--- trunk/src/native/AceUnitAssert.h 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnitAssert.h 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnitData.c
===================================================================
--- trunk/src/native/AceUnitData.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnitData.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnitData.h
===================================================================
--- trunk/src/native/AceUnitData.h 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnitData.h 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnitLoggerStub.c
===================================================================
--- trunk/src/native/AceUnitLoggerStub.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnitLoggerStub.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnitLogging.h
===================================================================
--- trunk/src/native/AceUnitLogging.h 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnitLogging.h 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnitMain.c
===================================================================
--- trunk/src/native/AceUnitMain.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnitMain.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/AceUnitPrintf.c
===================================================================
--- trunk/src/native/AceUnitPrintf.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/AceUnitPrintf.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/ExceptionHandling.c
===================================================================
--- trunk/src/native/ExceptionHandling.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/ExceptionHandling.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/ExceptionHandling.h
===================================================================
--- trunk/src/native/ExceptionHandling.h 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/ExceptionHandling.h 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/loggers/FullPlainLogger.c
===================================================================
--- trunk/src/native/loggers/FullPlainLogger.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/loggers/FullPlainLogger.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/loggers/JUnitXmlLogger.c
===================================================================
--- trunk/src/native/loggers/JUnitXmlLogger.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/loggers/JUnitXmlLogger.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/loggers/MiniRamLogger.c
===================================================================
--- trunk/src/native/loggers/MiniRamLogger.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/loggers/MiniRamLogger.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/basic/AceUnitTest.c
===================================================================
--- trunk/src/native/test/basic/AceUnitTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/basic/AceUnitTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/basic/RunTests.c
===================================================================
--- trunk/src/native/test/basic/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/basic/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/basicEmbedded/AceUnitTest.c
===================================================================
--- trunk/src/native/test/basicEmbedded/AceUnitTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/basicEmbedded/AceUnitTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/basicEmbedded/RunTests.c
===================================================================
--- trunk/src/native/test/basicEmbedded/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/basicEmbedded/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/comment/CommentTest.c
===================================================================
--- trunk/src/native/test/comment/CommentTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/comment/CommentTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/comment/RunTests.c
===================================================================
--- trunk/src/native/test/comment/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/comment/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/cplusplus/AceUnitTest.c
===================================================================
--- trunk/src/native/test/cplusplus/AceUnitTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/cplusplus/AceUnitTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/cplusplus/RunTests.c
===================================================================
--- trunk/src/native/test/cplusplus/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/cplusplus/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/cplusplus2/AceUnitTest.c
===================================================================
--- trunk/src/native/test/cplusplus2/AceUnitTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/cplusplus2/AceUnitTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/cplusplus2/AceUnitTest2.cpp
===================================================================
--- trunk/src/native/test/cplusplus2/AceUnitTest2.cpp 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/cplusplus2/AceUnitTest2.cpp 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/explicitMsg/AceUnitTest.c
===================================================================
--- trunk/src/native/test/explicitMsg/AceUnitTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/explicitMsg/AceUnitTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/explicitMsg/RunTests.c
===================================================================
--- trunk/src/native/test/explicitMsg/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/explicitMsg/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/group/GroupTest.c
===================================================================
--- trunk/src/native/test/group/GroupTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/group/GroupTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/group/RunTests.c
===================================================================
--- trunk/src/native/test/group/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/group/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/longjmp/LongJmpTest.c
===================================================================
--- trunk/src/native/test/longjmp/LongJmpTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/longjmp/LongJmpTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/longjmp/RunTests.c
===================================================================
--- trunk/src/native/test/longjmp/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/longjmp/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/loop/AceUnitLoopTest.c
===================================================================
--- trunk/src/native/test/loop/AceUnitLoopTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/loop/AceUnitLoopTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/loop/RunTests.c
===================================================================
--- trunk/src/native/test/loop/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/loop/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/printf/AceUnitPrintfTest.c
===================================================================
--- trunk/src/native/test/printf/AceUnitPrintfTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/printf/AceUnitPrintfTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/recursive/C1/C1Mod1.c
===================================================================
--- trunk/src/native/test/recursive/C1/C1Mod1.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/recursive/C1/C1Mod1.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/recursive/C1/C1Mod2.c
===================================================================
--- trunk/src/native/test/recursive/C1/C1Mod2.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/recursive/C1/C1Mod2.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/recursive/C1/tests/Mod1/C1Mod1Test.c
===================================================================
--- trunk/src/native/test/recursive/C1/tests/Mod1/C1Mod1Test.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/recursive/C1/tests/Mod1/C1Mod1Test.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/recursive/C1/tests/Mod2/C1Mod2Test.c
===================================================================
--- trunk/src/native/test/recursive/C1/tests/Mod2/C1Mod2Test.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/recursive/C1/tests/Mod2/C1Mod2Test.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/recursive/C2/C2Mod1.c
===================================================================
--- trunk/src/native/test/recursive/C2/C2Mod1.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/recursive/C2/C2Mod1.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/recursive/C2/C2Mod2.c
===================================================================
--- trunk/src/native/test/recursive/C2/C2Mod2.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/recursive/C2/C2Mod2.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/recursive/C2/tests/Mod1/C2Mod1Test.c
===================================================================
--- trunk/src/native/test/recursive/C2/tests/Mod1/C2Mod1Test.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/recursive/C2/tests/Mod1/C2Mod1Test.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/recursive/C2/tests/Mod2/C2Mod2Test.c
===================================================================
--- trunk/src/native/test/recursive/C2/tests/Mod2/C2Mod2Test.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/recursive/C2/tests/Mod2/C2Mod2Test.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/twoFixtures/Fixture1.c
===================================================================
--- trunk/src/native/test/twoFixtures/Fixture1.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/twoFixtures/Fixture1.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/twoFixtures/Fixture2.c
===================================================================
--- trunk/src/native/test/twoFixtures/Fixture2.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/twoFixtures/Fixture2.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/twoFixtures/RunTests.c
===================================================================
--- trunk/src/native/test/twoFixtures/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/twoFixtures/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/xmlLog/RunTests.c
===================================================================
--- trunk/src/native/test/xmlLog/RunTests.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/xmlLog/RunTests.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, Christian Hujer
+/* Copyright (c) 2008 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Modified: trunk/src/native/test/xmlLog/XmlLogTest.c
===================================================================
--- trunk/src/native/test/xmlLog/XmlLogTest.c 2011-02-14 08:54:52 UTC (rev 562)
+++ trunk/src/native/test/xmlLog/XmlLogTest.c 2011-02-14 09:44:10 UTC (rev 563)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007, Christian Hujer
+/* Copyright (c) 2007 - 2011, Christian Hujer
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-14 08:54:58
|
Revision: 562
http://aceunit.svn.sourceforge.net/aceunit/?rev=562&view=rev
Author: christianhujer
Date: 2011-02-14 08:54:52 +0000 (Mon, 14 Feb 2011)
Log Message:
-----------
Improve sort example.
Modified Paths:
--------------
trunk/src/doc/examples/sort/Makefile
trunk/src/doc/examples/sort/sortTest.c
Modified: trunk/src/doc/examples/sort/Makefile
===================================================================
--- trunk/src/doc/examples/sort/Makefile 2011-02-14 08:54:30 UTC (rev 561)
+++ trunk/src/doc/examples/sort/Makefile 2011-02-14 08:54:52 UTC (rev 562)
@@ -1,6 +1,6 @@
ACE_UNIT_PATH=../../..
-ACE_UNIT_FILES=AceUnit.c AceUnitData.c FullPlainLogger.c $(ACE_UNIT_PATH)/java/AceUnit.jar
+ACE_UNIT_FILES=AceUnitMain.c AceUnit.c AceUnitData.c FullPlainLogger.c
FIXTURE_NAME=sortTest
@@ -9,20 +9,21 @@
all: prepare compile
clean:
- rm -f $(FIXTURE_NAME).h runTests
+ rm -f $(FIXTURE_NAME).h AceUnitMain *.o $(shell grep -Rl '@warning This is a generated file. Do not edit. Your changes will be lost.' --exclude=Makefile .)
test: all
- ./runTests
+ ./AceUnitMain
-prepare: $(ACE_UNIT_FILES)
+prepare: $(ACE_UNIT_PATH)/java/AceUnit.jar
+ java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar .
$(ACE_UNIT_PATH)/java/AceUnit.jar:
(cd $(ACE_UNIT_PATH)/java ; ant)
-compile: runTests
+compile:
+ make AceUnitMain
-$(FIXTURE_NAME).h: $(ACE_UNIT_PATH)/java/AceUnit.jar $(FIXTURE_NAME).c
- java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar $(FIXTURE_NAME)
+CFLAGS=-W -Wall -pedantic
+CPPFLAGS=-DACEUNIT_SUITES -I $(ACE_UNIT_PATH)/native
-runTests: $(wildcard *.c) $(patsubst %.c,%.h,$(wildcard *.c)) $(ACE_UNIT_FILES)
- $(CC) -Wall -g -I $(ACE_UNIT_PATH)/native -o $@ $(filter %.c, $^)
+AceUnitMain: $(patsubst %.c,%.o,$(ACE_UNIT_FILES) $(wildcard *.c))
Modified: trunk/src/doc/examples/sort/sortTest.c
===================================================================
--- trunk/src/doc/examples/sort/sortTest.c 2011-02-14 08:54:30 UTC (rev 561)
+++ trunk/src/doc/examples/sort/sortTest.c 2011-02-14 08:54:52 UTC (rev 562)
@@ -31,9 +31,9 @@
* @file sortTest.c
*/
-#include <stdbool.h> // bool
-#include <stddef.h> // size_t
-#include <stdlib.h> // qsort
+#include <stdbool.h> /* bool */
+#include <stddef.h> /* size_t */
+#include <stdlib.h> /* qsort */
#include "sort.h"
#include "sortTest.h"
@@ -60,7 +60,7 @@
* @retval false otherwise.
*/
bool isSorted(const void *vector, const size_t nmemb, const size_t size, const comparator comp) {
- int i;
+ size_t i;
const char *ptr = vector;
for (i = 0; i < nmemb - 1; i++) {
if (comp(&ptr[i * size], &ptr[(i + 1) * size]) > 0) {
@@ -95,11 +95,3 @@
qsort(testling, 5, sizeof(int), &compareInt);
assertTrue("This vector now is sorted.", isSorted(testling, 5, sizeof(int), &compareInt));
}
-
-// Run the tests.
-// Note: This is only here temporarily.
-// In future versions, this part will be auto-generated.
-int main(int argc, char *argv[]) {
- runFixture(&sortTestFixture);
- return 0;
-}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-14 08:54:36
|
Revision: 561
http://aceunit.svn.sourceforge.net/aceunit/?rev=561&view=rev
Author: christianhujer
Date: 2011-02-14 08:54:30 +0000 (Mon, 14 Feb 2011)
Log Message:
-----------
Fix bogus include order.
Modified Paths:
--------------
trunk/src/native/AceUnitMain.c
Modified: trunk/src/native/AceUnitMain.c
===================================================================
--- trunk/src/native/AceUnitMain.c 2011-02-14 07:44:13 UTC (rev 560)
+++ trunk/src/native/AceUnitMain.c 2011-02-14 08:54:30 UTC (rev 561)
@@ -25,9 +25,9 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include <stdio.h>
#include "AceUnit.h"
#include "AceUnitData.h"
-#include <stdio.h>
#ifndef ACEUNIT_SUITES
#error Requires ACEUNIT_SUITES
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-14 07:44:19
|
Revision: 560
http://aceunit.svn.sourceforge.net/aceunit/?rev=560&view=rev
Author: christianhujer
Date: 2011-02-14 07:44:13 +0000 (Mon, 14 Feb 2011)
Log Message:
-----------
Documented linkage of data in MiniRamLogger.c.
Modified Paths:
--------------
trunk/src/native/loggers/MiniRamLogger.c
Modified: trunk/src/native/loggers/MiniRamLogger.c
===================================================================
--- trunk/src/native/loggers/MiniRamLogger.c 2011-02-14 01:17:44 UTC (rev 559)
+++ trunk/src/native/loggers/MiniRamLogger.c 2011-02-14 07:44:13 UTC (rev 560)
@@ -49,9 +49,11 @@
#endif
/** The number of valid logging elements in #data. */
+// Linkage note: RAM.
size_t elementCount;
/** AceUnit Mini Ram Logger data buffer. */
+// Linkage note: RAM.
AssertionError_t data[ACEUNIT_MINIRAM_LOGGER_BUFSIZE];
/** Initializes the Mini Ram Logger. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2011-02-14 01:17:51
|
Revision: 559
http://aceunit.svn.sourceforge.net/aceunit/?rev=559&view=rev
Author: christianhujer
Date: 2011-02-14 01:17:44 +0000 (Mon, 14 Feb 2011)
Log Message:
-----------
Move Loggers to a directory of their own.
Added Paths:
-----------
trunk/src/native/loggers/
trunk/src/native/loggers/FullPlainLogger.c
trunk/src/native/loggers/JUnitXmlLogger.c
trunk/src/native/loggers/MiniRamLogger.c
Removed Paths:
-------------
trunk/src/native/FullPlainLogger.c
trunk/src/native/JUnitXmlLogger.c
trunk/src/native/MiniRamLogger.c
Deleted: trunk/src/native/FullPlainLogger.c
===================================================================
--- trunk/src/native/FullPlainLogger.c 2011-02-14 01:17:19 UTC (rev 558)
+++ trunk/src/native/FullPlainLogger.c 2011-02-14 01:17:44 UTC (rev 559)
@@ -1,69 +0,0 @@
-/* Copyright (c) 2007, Christian Hujer
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the AceUnit developers nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** Full Logger implementation that logs plain text messages.
- * The format of the messages is suitable for processing in popular text editors like EMacs or Vim.
- * It is the same as that of error messages yielded by most popular compilers like gcc or javac.
- * The format is:
- * <p><code><var>filename</var>:<var>linenumber</var>: error: in <var>symbolnname</var>: <var>message</var></p>
- * For example:
- * <p><samp>foo.c:30: error: Expected X to be 15 but was 13.</samp></p>
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- * @file FullPlainLogger.c
- */
-
-#include <stdio.h>
-
-#include "AceUnit.h"
-#include "AceUnitLogging.h"
-
-/** Logs a message using this logger.
- * @param recentError Error to log.
- */
-void FullPlainLoggerLog(const AssertionError_t *const recentError) {
-#ifdef ACEUNIT_EMBEDDED
-#error "FullPlainLogger does not support embedded AceUnit."
-#else
- printf("%d:%d: error: in %d: %s\n", recentError->fixtureId, recentError->assertionId.lineNumber, recentError->testId, recentError->assertionId.message);
-#endif
-}
-
-/** This Logger. */
-AceUnitNewLogger(
- FullPlainLogger,
- NULL,
- NULL,
- NULL,
- NULL,
- FullPlainLoggerLog,
- NULL,
- NULL,
- NULL,
- NULL
-);
-
-TestLogger_t *globalLogger = &FullPlainLogger; /* XXX Hack. Remove. */
Deleted: trunk/src/native/JUnitXmlLogger.c
===================================================================
--- trunk/src/native/JUnitXmlLogger.c 2011-02-14 01:17:19 UTC (rev 558)
+++ trunk/src/native/JUnitXmlLogger.c 2011-02-14 01:17:44 UTC (rev 559)
@@ -1,216 +0,0 @@
-/* Copyright (c) 2007, Christian Hujer
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the AceUnit developers nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** The JUnitXmlLogger is a {@link TestLogger_t} implementation that writes a test log that is compatible with that of JUnit when using XML log format.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- * @file JUnitXmlLogger.c
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "AceUnit.h"
-#include "AceUnitLogging.h"
-
-/** Returns the host name of the host this test is executed on.
- * @return Host name
- */
-static char *getHostname() {
- char *hostname;
- hostname = getenv("HOSTNAME");
- if (NULL == hostname) {
- hostname = getenv("COMPUTERNAME");
- }
- if (NULL == hostname) {
- hostname = "unknown";
- }
- return hostname;
-}
-
-/** The name of the global file.
- * Do not change this without really thinking about: It is intentionally the same as that of JUnit / the JUnit Ant task.
- */
-#define GLOBAL_FILE_NAME "TESTS-TestSuites.xml"
-
-/** The file TESTS-TestSuites.xml which contains the accumulated log information of all test suites. */
-static FILE *globalFile = NULL;
-
-/** The global information recorded by this logger. */
-static struct {
- char *hostname;
- int suiteId;
-} globalInfo = {
- 0
-};
-
-/** The information about the current suite. */
-static struct {
- int errors;
- int failures;
- int id;
- char *name;
- char *package;
- char *fullname;
- int tests;
- float time;
- char *timestamp;
-} suiteInfo = {
- 0,
-};
-
-/** Initializes all global variables and prepares global log file output.
- * @see TestLogger_t#runnerStarted()}
- */
-static void runnerStarted() {
- globalFile = fopen(GLOBAL_FILE_NAME, "w");
- fprintf(globalFile, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
- fprintf(globalFile, "<testsuites>\n");
- fflush(globalFile);
- globalInfo.hostname = getHostname();
- globalInfo.suiteId = 0;
-}
-
-/** Initializes suite-specific variables.
- * @see TestLogger_t#suiteStarted()}
- */
-static void suiteStarted(SuiteId_t const suiteId) {
- suiteInfo.errors = 0;
- suiteInfo.failures = 0;
- suiteInfo.id = globalInfo.suiteId++;
-}
-
-/** Initializes fixture-specific variables.
- * @see TestLogger_t#fixtureStarted()}
- */
-static void fixtureStarted(const FixtureId_t fixture) {
- suiteInfo.package = NULL; /* TODO */
- suiteInfo.name = NULL; /* TODO */
- suiteInfo.tests = 0; /* TODO */
- suiteInfo.timestamp = NULL; /* TODO */
-}
-
-/** @see TestLogger_t#testCaseStarted()} */
-static void testCaseStarted(TestCaseId_t testCase) {
-}
-
-/** @see TestLogger_t#testCaseFailed()} */
-static void testCaseFailed(const AssertionError_t *assertion) {
-}
-
-/** @see TestLogger_t#testCaseEnded()} */
-static void testCaseEnded(TestCaseId_t testCase) {
-}
-
-/** @see TestLogger_t#fixtureEnded()} */
-static void fixtureEnded(FixtureId_t fixture) {
-}
-
-/** Prints the environment as properties XML element to the specified file.
- * @param file File to print to
- */
-static void printEnvAsProperties(FILE *file) {
-#ifdef ACEUNIT_JUNITXMLLOGGER_ENVIRONMENT
- extern char **environ;
- char **env = environ;
- size_t i;
- if (NULL == *env) {
-#endif
- fprintf(globalFile, " <properties/>\n");
-#ifdef ACEUNIT_JUNITXMLLOGGER_ENVIRONMENT
- } else {
- fprintf(globalFile, " <properties>\n");
- for (; NULL != *env; env++) {
- char *ptr = *env;
- fprintf(globalFile, " <property name=\"");
- for (i = 0; i < strlen(ptr); i++) {
- if ('=' == ptr[i]) {
- break;
- }
- }
- fwrite(*ptr, sizeof(char), i, globalFile);
- ptr += i + 1;
- fprintf(globalFile, "\" value=\"");
- fwrite(*ptr, sizeof(char), strlen(ptr), globalFile);
- fprintf(globalFile, "\" />\n");
- }
- fprintf(globalFile, " </properties>\n");
- }
-#endif
-}
-
-/** @see TestLogger_t#suiteEnded()} */
-static void suiteEnded(SuiteId_t const suiteId) {
- int i;
- FILE *localFile;
- /* <testsuite errors="0" failures="0" hostname="riedquat" id="1" name="BasicCommandTest" package="test.net.sf.japi.io.args" tests="10" time="0.105" timestamp="2007-11-06T20:15:24"> */
- fprintf(globalFile, " <testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" id=\"%d\" name=\"%s\" package=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n", 0/*TODO*/, 0/*TODO*/, globalInfo.hostname, 0/*TODO*/, ""/*TODO*/, ""/*TODO*/, 0/*TODO*/, 0.0/*TODO*/, ""/*TODO*/);
- printEnvAsProperties(globalFile);
- for (i = 0; i < suiteInfo.tests; i++) {
- /*<testcase classname="test.net.sf.japi.io.args.BasicCommandTest" name="testHelp" time="0.0090" />*/
- fprintf(globalFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n", ""/*TODO*/, ""/*TODO*/, 0.0/*TODO*/);
- }
- fprintf(globalFile, " <system-out/>\n");
- fprintf(globalFile, " <system-err/>\n");
- fprintf(globalFile, " </testsuite>\n");
- fflush(globalFile);
-
- localFile = fopen("TEST-test.net.sf.japi.io.args.ArgParserTest.xml", "w"); /* TODO: configure filename */
- /* <testsuite errors="0" failures="0" hostname="riedquat" name="test.net.sf.japi.io.args.ArgParserTest" tests="19" time="3.463" timestamp="2007-11-06T20:15:21"> */
- fprintf(localFile, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
- fprintf(localFile, "<testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" name=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n", 0/*TODO*/, 0/*TODO*/, globalInfo.hostname, ""/*TODO*/, 0/*TODO*/, 0.0/*TODO*/, ""/*TODO*/);
- fprintf(localFile, " <properties/>\n"); /* TODO: encode environment as properties? */
- for (i = 0; i < suiteInfo.tests; i++) {
- /* <testcase classname="test.net.sf.japi.io.args.ArgParserTest" name="testSimpleParseAndRun" time="0.0080" /> */
- fprintf(localFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n", ""/*TODO*/, ""/*TODO*/, 0.0/*TODO*/);
- }
- fprintf(localFile, " <system-out/>\n");
- fprintf(localFile, " <system-err/>\n");
- fprintf(localFile, "</testsuite>\n");
- fclose(localFile);
-}
-
-/** @see TestLogger_t#runnerEnded()} */
-static void runnerEnded() {
- fprintf(globalFile, "</testsuites>\n");
- fclose(globalFile);
-}
-
-/** This Logger. */
-AceUnitNewLogger(
- JUnitXmlLogger,
- runnerStarted,
- suiteStarted,
- fixtureStarted,
- testCaseStarted,
- testCaseFailed,
- testCaseEnded,
- fixtureEnded,
- suiteEnded,
- runnerEnded
-);
-
-TestLogger_t *globalLogger = &JUnitXmlLogger; /* XXX Hack. Remove. */
Deleted: trunk/src/native/MiniRamLogger.c
===================================================================
--- trunk/src/native/MiniRamLogger.c 2011-02-14 01:17:19 UTC (rev 558)
+++ trunk/src/native/MiniRamLogger.c 2011-02-14 01:17:44 UTC (rev 559)
@@ -1,99 +0,0 @@
-/* Copyright (c) 2007, Christian Hujer
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the AceUnit developers nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/** Mini Ram Logger implementation that logs messages to RAM with as little memory consumption as possible.
- * The format of the messages is suitable for postprocessing to convert it into the same format as that of {@link FullPlainLogger.c}.
- * This Logger also could serve as a template if you want to create your own logger that e.g. logs by writing to a NVM like EEPROM or Flash.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- * @file MiniRamLogger.c
- */
-
-#include "AceUnit.h"
-#include "AceUnitLogging.h"
-#ifndef ACEUNIT_EMBEDDED
-#error "MiniRamLogger can only be used for ACEUNIT_EMBEDDED."
-#endif
-
-#ifdef ACEUNIT_MINIRAMLOGGER_SAVE
-#include <stdio.h>
-#endif
-#include <string.h>
-
-#ifndef ACEUNIT_MINIRAM_LOGGER_BUFSIZE
-/** The size of the buffer that's used for the Mini Ram Logger. */
-#define ACEUNIT_MINIRAM_LOGGER_BUFSIZE 32
-#endif
-
-/** The number of valid logging elements in #data. */
-size_t elementCount;
-
-/** AceUnit Mini Ram Logger data buffer. */
-AssertionError_t data[ACEUNIT_MINIRAM_LOGGER_BUFSIZE];
-
-/** Initializes the Mini Ram Logger. */
-void MiniRamLoggerInit() {
- elementCount = 0;
- memset(data, 0, sizeof(data));
-}
-
-/** Logs a message using this logger.
- * @param recentError Error to log.
- */
-void MiniRamLoggerLog(const AssertionError_t *const recentError) {
- data[elementCount++] = *recentError;
-}
-
-#ifdef ACEUNIT_MINIRAMLOGGER_SAVE
-/** Writes contents of the Mini Ram Logger to a file.
- * @param file File to write to.
- */
-void MiniRamLoggerSave(FILE *file) {
- /* The file will first contain a BOM (byte order mark).
- * That enables tools that read this file to find out whether it was written in Big Endian or Little Endian.
- */
- uint16_t bom = 0xFFFE;
- fwrite(&bom, sizeof(uint16_t), 1, file);
-
- /* Now write the data. */
- fwrite(data, sizeof(AssertionError_t), elementCount, file);
-}
-#endif
-
-/** This Logger. */
-AceUnitNewLogger(MiniRamLogger,
- NULL,
- NULL,
- NULL,
- NULL,
- MiniRamLoggerLog,
- NULL,
- NULL,
- NULL,
- NULL
-);
-
-TestLogger_t *globalLogger = &MiniRamLogger; /* XXX Hack. Remove. */
Copied: trunk/src/native/loggers/FullPlainLogger.c (from rev 556, trunk/src/native/FullPlainLogger.c)
===================================================================
--- trunk/src/native/loggers/FullPlainLogger.c (rev 0)
+++ trunk/src/native/loggers/FullPlainLogger.c 2011-02-14 01:17:44 UTC (rev 559)
@@ -0,0 +1,69 @@
+/* Copyright (c) 2007, Christian Hujer
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the AceUnit developers nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** Full Logger implementation that logs plain text messages.
+ * The format of the messages is suitable for processing in popular text editors like EMacs or Vim.
+ * It is the same as that of error messages yielded by most popular compilers like gcc or javac.
+ * The format is:
+ * <p><code><var>filename</var>:<var>linenumber</var>: error: in <var>symbolnname</var>: <var>message</var></p>
+ * For example:
+ * <p><samp>foo.c:30: error: Expected X to be 15 but was 13.</samp></p>
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ * @file FullPlainLogger.c
+ */
+
+#include <stdio.h>
+
+#include "AceUnit.h"
+#include "AceUnitLogging.h"
+
+/** Logs a message using this logger.
+ * @param recentError Error to log.
+ */
+void FullPlainLoggerLog(const AssertionError_t *const recentError) {
+#ifdef ACEUNIT_EMBEDDED
+#error "FullPlainLogger does not support embedded AceUnit."
+#else
+ printf("%d:%d: error: in %d: %s\n", recentError->fixtureId, recentError->assertionId.lineNumber, recentError->testId, recentError->assertionId.message);
+#endif
+}
+
+/** This Logger. */
+AceUnitNewLogger(
+ FullPlainLogger,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ FullPlainLoggerLog,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+);
+
+TestLogger_t *globalLogger = &FullPlainLogger; /* XXX Hack. Remove. */
Copied: trunk/src/native/loggers/JUnitXmlLogger.c (from rev 556, trunk/src/native/JUnitXmlLogger.c)
===================================================================
--- trunk/src/native/loggers/JUnitXmlLogger.c (rev 0)
+++ trunk/src/native/loggers/JUnitXmlLogger.c 2011-02-14 01:17:44 UTC (rev 559)
@@ -0,0 +1,216 @@
+/* Copyright (c) 2007, Christian Hujer
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the AceUnit developers nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** The JUnitXmlLogger is a {@link TestLogger_t} implementation that writes a test log that is compatible with that of JUnit when using XML log format.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ * @file JUnitXmlLogger.c
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "AceUnit.h"
+#include "AceUnitLogging.h"
+
+/** Returns the host name of the host this test is executed on.
+ * @return Host name
+ */
+static char *getHostname() {
+ char *hostname;
+ hostname = getenv("HOSTNAME");
+ if (NULL == hostname) {
+ hostname = getenv("COMPUTERNAME");
+ }
+ if (NULL == hostname) {
+ hostname = "unknown";
+ }
+ return hostname;
+}
+
+/** The name of the global file.
+ * Do not change this without really thinking about: It is intentionally the same as that of JUnit / the JUnit Ant task.
+ */
+#define GLOBAL_FILE_NAME "TESTS-TestSuites.xml"
+
+/** The file TESTS-TestSuites.xml which contains the accumulated log information of all test suites. */
+static FILE *globalFile = NULL;
+
+/** The global information recorded by this logger. */
+static struct {
+ char *hostname;
+ int suiteId;
+} globalInfo = {
+ 0
+};
+
+/** The information about the current suite. */
+static struct {
+ int errors;
+ int failures;
+ int id;
+ char *name;
+ char *package;
+ char *fullname;
+ int tests;
+ float time;
+ char *timestamp;
+} suiteInfo = {
+ 0,
+};
+
+/** Initializes all global variables and prepares global log file output.
+ * @see TestLogger_t#runnerStarted()}
+ */
+static void runnerStarted() {
+ globalFile = fopen(GLOBAL_FILE_NAME, "w");
+ fprintf(globalFile, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
+ fprintf(globalFile, "<testsuites>\n");
+ fflush(globalFile);
+ globalInfo.hostname = getHostname();
+ globalInfo.suiteId = 0;
+}
+
+/** Initializes suite-specific variables.
+ * @see TestLogger_t#suiteStarted()}
+ */
+static void suiteStarted(SuiteId_t const suiteId) {
+ suiteInfo.errors = 0;
+ suiteInfo.failures = 0;
+ suiteInfo.id = globalInfo.suiteId++;
+}
+
+/** Initializes fixture-specific variables.
+ * @see TestLogger_t#fixtureStarted()}
+ */
+static void fixtureStarted(const FixtureId_t fixture) {
+ suiteInfo.package = NULL; /* TODO */
+ suiteInfo.name = NULL; /* TODO */
+ suiteInfo.tests = 0; /* TODO */
+ suiteInfo.timestamp = NULL; /* TODO */
+}
+
+/** @see TestLogger_t#testCaseStarted()} */
+static void testCaseStarted(TestCaseId_t testCase) {
+}
+
+/** @see TestLogger_t#testCaseFailed()} */
+static void testCaseFailed(const AssertionError_t *assertion) {
+}
+
+/** @see TestLogger_t#testCaseEnded()} */
+static void testCaseEnded(TestCaseId_t testCase) {
+}
+
+/** @see TestLogger_t#fixtureEnded()} */
+static void fixtureEnded(FixtureId_t fixture) {
+}
+
+/** Prints the environment as properties XML element to the specified file.
+ * @param file File to print to
+ */
+static void printEnvAsProperties(FILE *file) {
+#ifdef ACEUNIT_JUNITXMLLOGGER_ENVIRONMENT
+ extern char **environ;
+ char **env = environ;
+ size_t i;
+ if (NULL == *env) {
+#endif
+ fprintf(globalFile, " <properties/>\n");
+#ifdef ACEUNIT_JUNITXMLLOGGER_ENVIRONMENT
+ } else {
+ fprintf(globalFile, " <properties>\n");
+ for (; NULL != *env; env++) {
+ char *ptr = *env;
+ fprintf(globalFile, " <property name=\"");
+ for (i = 0; i < strlen(ptr); i++) {
+ if ('=' == ptr[i]) {
+ break;
+ }
+ }
+ fwrite(*ptr, sizeof(char), i, globalFile);
+ ptr += i + 1;
+ fprintf(globalFile, "\" value=\"");
+ fwrite(*ptr, sizeof(char), strlen(ptr), globalFile);
+ fprintf(globalFile, "\" />\n");
+ }
+ fprintf(globalFile, " </properties>\n");
+ }
+#endif
+}
+
+/** @see TestLogger_t#suiteEnded()} */
+static void suiteEnded(SuiteId_t const suiteId) {
+ int i;
+ FILE *localFile;
+ /* <testsuite errors="0" failures="0" hostname="riedquat" id="1" name="BasicCommandTest" package="test.net.sf.japi.io.args" tests="10" time="0.105" timestamp="2007-11-06T20:15:24"> */
+ fprintf(globalFile, " <testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" id=\"%d\" name=\"%s\" package=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n", 0/*TODO*/, 0/*TODO*/, globalInfo.hostname, 0/*TODO*/, ""/*TODO*/, ""/*TODO*/, 0/*TODO*/, 0.0/*TODO*/, ""/*TODO*/);
+ printEnvAsProperties(globalFile);
+ for (i = 0; i < suiteInfo.tests; i++) {
+ /*<testcase classname="test.net.sf.japi.io.args.BasicCommandTest" name="testHelp" time="0.0090" />*/
+ fprintf(globalFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n", ""/*TODO*/, ""/*TODO*/, 0.0/*TODO*/);
+ }
+ fprintf(globalFile, " <system-out/>\n");
+ fprintf(globalFile, " <system-err/>\n");
+ fprintf(globalFile, " </testsuite>\n");
+ fflush(globalFile);
+
+ localFile = fopen("TEST-test.net.sf.japi.io.args.ArgParserTest.xml", "w"); /* TODO: configure filename */
+ /* <testsuite errors="0" failures="0" hostname="riedquat" name="test.net.sf.japi.io.args.ArgParserTest" tests="19" time="3.463" timestamp="2007-11-06T20:15:21"> */
+ fprintf(localFile, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n");
+ fprintf(localFile, "<testsuite errors=\"%d\" failures=\"%d\" hostname=\"%s\" name=\"%s\" tests=\"%d\" time=\"%f\" timestamp=\"%s\">\n", 0/*TODO*/, 0/*TODO*/, globalInfo.hostname, ""/*TODO*/, 0/*TODO*/, 0.0/*TODO*/, ""/*TODO*/);
+ fprintf(localFile, " <properties/>\n"); /* TODO: encode environment as properties? */
+ for (i = 0; i < suiteInfo.tests; i++) {
+ /* <testcase classname="test.net.sf.japi.io.args.ArgParserTest" name="testSimpleParseAndRun" time="0.0080" /> */
+ fprintf(localFile, " <testcase classname=\"%s\" name=\"%s\" time=\"%f\" />\n", ""/*TODO*/, ""/*TODO*/, 0.0/*TODO*/);
+ }
+ fprintf(localFile, " <system-out/>\n");
+ fprintf(localFile, " <system-err/>\n");
+ fprintf(localFile, "</testsuite>\n");
+ fclose(localFile);
+}
+
+/** @see TestLogger_t#runnerEnded()} */
+static void runnerEnded() {
+ fprintf(globalFile, "</testsuites>\n");
+ fclose(globalFile);
+}
+
+/** This Logger. */
+AceUnitNewLogger(
+ JUnitXmlLogger,
+ runnerStarted,
+ suiteStarted,
+ fixtureStarted,
+ testCaseStarted,
+ testCaseFailed,
+ testCaseEnded,
+ fixtureEnded,
+ suiteEnded,
+ runnerEnded
+);
+
+TestLogger_t *globalLogger = &JUnitXmlLogger; /* XXX Hack. Remove. */
Copied: trunk/src/native/loggers/MiniRamLogger.c (from rev 556, trunk/src/native/MiniRamLogger.c)
===================================================================
--- trunk/src/native/loggers/MiniRamLogger.c (rev 0)
+++ trunk/src/native/loggers/MiniRamLogger.c 2011-02-14 01:17:44 UTC (rev 559)
@@ -0,0 +1,99 @@
+/* Copyright (c) 2007, Christian Hujer
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the AceUnit developers nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+ * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** Mini Ram Logger implementation that logs messages to RAM with as little memory consumption as possible.
+ * The format of the messages is suitable for postprocessing to convert it into the same format as that of {@link FullPlainLogger.c}.
+ * This Logger also could serve as a template if you want to create your own logger that e.g. logs by writing to a NVM like EEPROM or Flash.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ * @file MiniRamLogger.c
+ */
+
+#include "AceUnit.h"
+#include "AceUnitLogging.h"
+#ifndef ACEUNIT_EMBEDDED
+#error "MiniRamLogger can only be used for ACEUNIT_EMBEDDED."
+#endif
+
+#ifdef ACEUNIT_MINIRAMLOGGER_SAVE
+#include <stdio.h>
+#endif
+#include <string.h>
+
+#ifndef ACEUNIT_MINIRAM_LOGGER_BUFSIZE
+/** The size of the buffer that's used for the Mini Ram Logger. */
+#define ACEUNIT_MINIRAM_LOGGER_BUFSIZE 32
+#endif
+
+/** The number of valid logging elements in #data. */
+size_t elementCount;
+
+/** AceUnit Mini Ram Logger data buffer. */
+AssertionError_t data[ACEUNIT_MINIRAM_LOGGER_BUFSIZE];
+
+/** Initializes the Mini Ram Logger. */
+void MiniRamLoggerInit() {
+ elementCount = 0;
+ memset(data, 0, sizeof(data));
+}
+
+/** Logs a message using this logger.
+ * @param recentError Error to log.
+ */
+void MiniRamLoggerLog(const AssertionError_t *const recentError) {
+ data[elementCount++] = *recentError;
+}
+
+#ifdef ACEUNIT_MINIRAMLOGGER_SAVE
+/** Writes contents of the Mini Ram Logger to a file.
+ * @param file File to write to.
+ */
+void MiniRamLoggerSave(FILE *file) {
+ /* The file will first contain a BOM (byte order mark).
+ * That enables tools that read this file to find out whether it was written in Big Endian or Little Endian.
+ */
+ uint16_t bom = 0xFFFE;
+ fwrite(&bom, sizeof(uint16_t), 1, file);
+
+ /* Now write the data. */
+ fwrite(data, sizeof(AssertionError_t), elementCount, file);
+}
+#endif
+
+/** This Logger. */
+AceUnitNewLogger(MiniRamLogger,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ MiniRamLoggerLog,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+);
+
+TestLogger_t *globalLogger = &MiniRamLogger; /* XXX Hack. Remove. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|