-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle parameterized unit tests. (#604)
- Loading branch information
Showing
5 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Custom JUnit test formatter that outputs executed and failing tests, following | ||
# Defects4J's naming conventions for test entries. | ||
|
||
Run ant test to compile and test the formatter implementation. | ||
|
||
Run ant jar to build and deploy the `formatter.jar`. |
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
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
36 changes: 36 additions & 0 deletions
36
framework/lib/formatter/test/edu/washington/cs/mut/testrunner/junit4/ParamTest.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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package edu.washington.cs.mut.testrunner.junit4; | ||
|
||
import static org.junit.Assert.assertTrue; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.Parameterized; | ||
import org.junit.runners.Parameterized.Parameters; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
@RunWith(Parameterized.class) | ||
public class ParamTest { | ||
|
||
private Integer testNo; | ||
|
||
public ParamTest(Integer n) { | ||
this.testNo = n; | ||
} | ||
|
||
@Parameters | ||
public static Collection<Object[]> params() { | ||
final List<Object[]> list = new ArrayList<Object[]>(3); | ||
list.add(new Integer[] {1}); | ||
list.add(new Integer[] {2}); | ||
list.add(new Integer[] {3}); | ||
return list; | ||
} | ||
|
||
@Test | ||
public void testWithParams() { | ||
assertTrue(false); | ||
} | ||
} |