forked from christ66/cobertura
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
276 additions
and
276 deletions.
There are no files selected for viewing
58 changes: 29 additions & 29 deletions
58
cobertura/src/test/resources/advancedInstrumenting/org/test/teststates/TestDone.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
package org.test.teststates; | ||
|
||
public final class TestDone extends TestState { | ||
public static final TestDone INSTANCE = new TestDone("TestDone"); | ||
|
||
private static java.util.List<TestState> SUBSTATES; | ||
|
||
public static java.util.List<TestState> getSubstates() { | ||
if (SUBSTATES == null) { | ||
java.util.List<TestState> tmpSubstates = new java.util.ArrayList<TestState>(); | ||
SUBSTATES = tmpSubstates; | ||
} | ||
return SUBSTATES; | ||
} | ||
|
||
private TestDone(String name) { | ||
super(name); | ||
} | ||
|
||
static { | ||
// ensure that all instances are actually created when this class is loaded. | ||
final Object[] dummy = new Object [] { | ||
TestRunning.INSTANCE, | ||
TestDone.INSTANCE, | ||
TestCreated.INSTANCE, | ||
null | ||
}; | ||
} | ||
} | ||
package org.test.teststates; | ||
|
||
public final class TestDone extends TestState { | ||
public static final TestDone INSTANCE = new TestDone("TestDone"); | ||
|
||
private static java.util.List<TestState> SUBSTATES; | ||
|
||
public static java.util.List<TestState> getSubstates() { | ||
if (SUBSTATES == null) { | ||
java.util.List<TestState> tmpSubstates = new java.util.ArrayList<TestState>(); | ||
SUBSTATES = tmpSubstates; | ||
} | ||
return SUBSTATES; | ||
} | ||
|
||
private TestDone(String name) { | ||
super(name); | ||
} | ||
|
||
static { | ||
// ensure that all instances are actually created when this class is loaded. | ||
final Object[] dummy = new Object [] { | ||
TestRunning.INSTANCE, | ||
TestDone.INSTANCE, | ||
TestCreated.INSTANCE, | ||
null | ||
}; | ||
} | ||
} |
60 changes: 30 additions & 30 deletions
60
cobertura/src/test/resources/advancedInstrumenting/org/test/teststates/TestPending.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
package org.test.teststates; | ||
|
||
public abstract class TestPending extends TestState { | ||
|
||
private static java.util.List<TestState> SUBSTATES; | ||
|
||
public static java.util.List<TestState> getSubstates() { | ||
if (SUBSTATES == null) { | ||
java.util.List<TestState> tmpSubstates = new java.util.ArrayList<TestState>(); | ||
tmpSubstates.add(org.test.teststates.TestRunning.INSTANCE); | ||
tmpSubstates.add(org.test.teststates.TestCreated.INSTANCE); | ||
SUBSTATES = tmpSubstates; | ||
} | ||
return SUBSTATES; | ||
} | ||
|
||
protected TestPending(String name) { | ||
super(name); | ||
} | ||
|
||
static { | ||
// ensure that all instances are actually created when this class is loaded. | ||
final Object[] dummy = new Object [] { | ||
TestRunning.INSTANCE, | ||
TestDone.INSTANCE, | ||
TestCreated.INSTANCE, | ||
null | ||
}; | ||
} | ||
} | ||
package org.test.teststates; | ||
|
||
public abstract class TestPending extends TestState { | ||
|
||
private static java.util.List<TestState> SUBSTATES; | ||
|
||
public static java.util.List<TestState> getSubstates() { | ||
if (SUBSTATES == null) { | ||
java.util.List<TestState> tmpSubstates = new java.util.ArrayList<TestState>(); | ||
tmpSubstates.add(org.test.teststates.TestRunning.INSTANCE); | ||
tmpSubstates.add(org.test.teststates.TestCreated.INSTANCE); | ||
SUBSTATES = tmpSubstates; | ||
} | ||
return SUBSTATES; | ||
} | ||
|
||
protected TestPending(String name) { | ||
super(name); | ||
} | ||
|
||
static { | ||
// ensure that all instances are actually created when this class is loaded. | ||
final Object[] dummy = new Object [] { | ||
TestRunning.INSTANCE, | ||
TestDone.INSTANCE, | ||
TestCreated.INSTANCE, | ||
null | ||
}; | ||
} | ||
} |
58 changes: 29 additions & 29 deletions
58
cobertura/src/test/resources/advancedInstrumenting/org/test/teststates/TestRunning.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
package org.test.teststates; | ||
|
||
public final class TestRunning extends TestPending { | ||
public static final TestRunning INSTANCE = new TestRunning("TestRunning"); | ||
|
||
private static java.util.List<TestState> SUBSTATES; | ||
|
||
public static java.util.List<TestState> getSubstates() { | ||
if (SUBSTATES == null) { | ||
java.util.List<TestState> tmpSubstates = new java.util.ArrayList<TestState>(); | ||
SUBSTATES = tmpSubstates; | ||
} | ||
return SUBSTATES; | ||
} | ||
|
||
private TestRunning(String name) { | ||
super(name); | ||
} | ||
|
||
static { | ||
// ensure that all instances are actually created when this class is loaded. | ||
final Object[] dummy = new Object [] { | ||
TestRunning.INSTANCE, | ||
TestDone.INSTANCE, | ||
TestCreated.INSTANCE, | ||
null | ||
}; | ||
} | ||
} | ||
package org.test.teststates; | ||
|
||
public final class TestRunning extends TestPending { | ||
public static final TestRunning INSTANCE = new TestRunning("TestRunning"); | ||
|
||
private static java.util.List<TestState> SUBSTATES; | ||
|
||
public static java.util.List<TestState> getSubstates() { | ||
if (SUBSTATES == null) { | ||
java.util.List<TestState> tmpSubstates = new java.util.ArrayList<TestState>(); | ||
SUBSTATES = tmpSubstates; | ||
} | ||
return SUBSTATES; | ||
} | ||
|
||
private TestRunning(String name) { | ||
super(name); | ||
} | ||
|
||
static { | ||
// ensure that all instances are actually created when this class is loaded. | ||
final Object[] dummy = new Object [] { | ||
TestRunning.INSTANCE, | ||
TestDone.INSTANCE, | ||
TestCreated.INSTANCE, | ||
null | ||
}; | ||
} | ||
} |
126 changes: 63 additions & 63 deletions
126
cobertura/src/test/resources/advancedInstrumenting/org/test/teststates/TestState.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,63 @@ | ||
package org.test.teststates; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public abstract class TestState { | ||
|
||
private static java.util.Map<String, TestState> SUBSTATES; | ||
|
||
private static java.util.List<TestState> SUBSTATE_LIST; | ||
|
||
private static java.util.Map<String, TestState> getSubstateMap() { | ||
if (SUBSTATES == null) { | ||
java.util.Map<String, TestState> tmpSubstates = new java.util.HashMap<String, TestState>(); | ||
tmpSubstates.put(org.test.teststates.TestRunning.INSTANCE.getName(), org.test.teststates.TestRunning.INSTANCE); | ||
tmpSubstates.put(org.test.teststates.TestDone.INSTANCE.getName(), org.test.teststates.TestDone.INSTANCE); | ||
tmpSubstates.put(org.test.teststates.TestCreated.INSTANCE.getName(), org.test.teststates.TestCreated.INSTANCE); | ||
SUBSTATES = tmpSubstates; | ||
} | ||
return SUBSTATES; | ||
} | ||
|
||
public static java.util.List<TestState> getSubstates() { | ||
if (SUBSTATE_LIST == null) { | ||
SUBSTATE_LIST = new java.util.ArrayList<TestState>(getSubstateMap().values()); | ||
} | ||
return SUBSTATE_LIST; | ||
} | ||
|
||
public static TestState getState(String name) { | ||
return getSubstateMap().get(name); | ||
} | ||
|
||
public static List<TestState> getStateList() { | ||
return getSubstates(); | ||
} | ||
|
||
public static Map<String, TestState> getStateMap() { | ||
return getSubstateMap(); | ||
} | ||
|
||
private String name; | ||
|
||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
protected TestState(String name) { | ||
this.name = name; | ||
} | ||
|
||
static { | ||
// ensure that all instances are actually created when this class is loaded. | ||
final Object[] dummy = new Object [] { | ||
TestRunning.INSTANCE, | ||
TestDone.INSTANCE, | ||
TestCreated.INSTANCE, | ||
null | ||
}; | ||
// Avoid compiler warning | ||
dummy.getClass(); | ||
} | ||
} | ||
package org.test.teststates; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public abstract class TestState { | ||
|
||
private static java.util.Map<String, TestState> SUBSTATES; | ||
|
||
private static java.util.List<TestState> SUBSTATE_LIST; | ||
|
||
private static java.util.Map<String, TestState> getSubstateMap() { | ||
if (SUBSTATES == null) { | ||
java.util.Map<String, TestState> tmpSubstates = new java.util.HashMap<String, TestState>(); | ||
tmpSubstates.put(org.test.teststates.TestRunning.INSTANCE.getName(), org.test.teststates.TestRunning.INSTANCE); | ||
tmpSubstates.put(org.test.teststates.TestDone.INSTANCE.getName(), org.test.teststates.TestDone.INSTANCE); | ||
tmpSubstates.put(org.test.teststates.TestCreated.INSTANCE.getName(), org.test.teststates.TestCreated.INSTANCE); | ||
SUBSTATES = tmpSubstates; | ||
} | ||
return SUBSTATES; | ||
} | ||
|
||
public static java.util.List<TestState> getSubstates() { | ||
if (SUBSTATE_LIST == null) { | ||
SUBSTATE_LIST = new java.util.ArrayList<TestState>(getSubstateMap().values()); | ||
} | ||
return SUBSTATE_LIST; | ||
} | ||
|
||
public static TestState getState(String name) { | ||
return getSubstateMap().get(name); | ||
} | ||
|
||
public static List<TestState> getStateList() { | ||
return getSubstates(); | ||
} | ||
|
||
public static Map<String, TestState> getStateMap() { | ||
return getSubstateMap(); | ||
} | ||
|
||
private String name; | ||
|
||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
protected TestState(String name) { | ||
this.name = name; | ||
} | ||
|
||
static { | ||
// ensure that all instances are actually created when this class is loaded. | ||
final Object[] dummy = new Object [] { | ||
TestRunning.INSTANCE, | ||
TestDone.INSTANCE, | ||
TestCreated.INSTANCE, | ||
null | ||
}; | ||
// Avoid compiler warning | ||
dummy.getClass(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
This directory contains an example of using Cobertura to | ||
instrument an application and generate coverage reports. | ||
To run the example: | ||
ant | ||
The application and its tests will be compiled, Cobertura will | ||
instrument the application, the instrumented application will then be | ||
tested, and a Cobertura report produced in HTML and XML. | ||
The Cobertura reports can be found in: | ||
reports/cobertura-html/index.html | ||
reports/cobertura-xml/coverage.xml | ||
This directory contains an example of using Cobertura to | ||
instrument an application and generate coverage reports. | ||
|
||
To run the example: | ||
ant | ||
|
||
The application and its tests will be compiled, Cobertura will | ||
instrument the application, the instrumented application will then be | ||
tested, and a Cobertura report produced in HTML and XML. | ||
|
||
The Cobertura reports can be found in: | ||
reports/cobertura-html/index.html | ||
reports/cobertura-xml/coverage.xml | ||
|
28 changes: 14 additions & 14 deletions
28
cobertura/src/test/resources/ant/IgnoreMethodAnnotation/README
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
This directory contains an example of using Cobertura to | ||
instrument an application and generate coverage reports. | ||
To run the example: | ||
ant | ||
The application and its tests will be compiled, Cobertura will | ||
instrument the application, the instrumented application will then be | ||
tested, and a Cobertura report produced in HTML and XML. | ||
The Cobertura reports can be found in: | ||
reports/cobertura-html/index.html | ||
reports/cobertura-xml/coverage.xml | ||
This directory contains an example of using Cobertura to | ||
instrument an application and generate coverage reports. | ||
|
||
To run the example: | ||
ant | ||
|
||
The application and its tests will be compiled, Cobertura will | ||
instrument the application, the instrumented application will then be | ||
tested, and a Cobertura report produced in HTML and XML. | ||
|
||
The Cobertura reports can be found in: | ||
reports/cobertura-html/index.html | ||
reports/cobertura-xml/coverage.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
This directory contains an example of using Cobertura to | ||
instrument an application and generate coverage reports. | ||
To run the example: | ||
ant | ||
The application and its tests will be compiled, Cobertura will | ||
instrument the application, the instrumented application will then be | ||
tested, and a Cobertura report produced in HTML and XML. | ||
The Cobertura reports can be found in: | ||
reports/cobertura-html/index.html | ||
reports/cobertura-xml/coverage.xml | ||
This directory contains an example of using Cobertura to | ||
instrument an application and generate coverage reports. | ||
|
||
To run the example: | ||
ant | ||
|
||
The application and its tests will be compiled, Cobertura will | ||
instrument the application, the instrumented application will then be | ||
tested, and a Cobertura report produced in HTML and XML. | ||
|
||
The Cobertura reports can be found in: | ||
reports/cobertura-html/index.html | ||
reports/cobertura-xml/coverage.xml | ||
|
Oops, something went wrong.