-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add several Defects4J Math bugs
- Loading branch information
Showing
5 changed files
with
141 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
# executing all tests in Defects4jEvaluationTest | ||
cd nopol | ||
mvn -q versions:set -DnewVersion=TRAVIS | ||
# creating target/nopol-TRAVIS-jar-with-dependencies.jar | ||
mvn -q clean package -DskipTests | ||
|
||
env NOPOL_EVAL_DEFECTS4J=1 mvn -q test -Dtest="Defects4jEvaluationMathTest" | ||
|
||
|
||
|
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
123 changes: 123 additions & 0 deletions
123
nopol/src/test/java/fr/inria/lille/repair/nopol/Defects4jEvaluationMathTest.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,123 @@ | ||
package fr.inria.lille.repair.nopol; | ||
|
||
import fr.inria.lille.repair.common.config.NopolContext; | ||
import org.junit.Test; | ||
|
||
import static fr.inria.lille.repair.nopol.Defects4jUtils.FIFTEEN_MINUTES_TIMEOUT; | ||
import static fr.inria.lille.repair.nopol.Defects4jUtils.FIVE_MINUTES_TIMEOUT; | ||
import static fr.inria.lille.repair.nopol.Defects4jUtils.TEN_MINUTES_TIMEOUT; | ||
import static fr.inria.lille.repair.nopol.Defects4jUtils.nopolConfigFor; | ||
import static fr.inria.lille.repair.nopol.Defects4jUtils.testShouldBeRun; | ||
import static org.junit.Assert.assertEquals; | ||
|
||
public class Defects4jEvaluationMathTest { | ||
|
||
@Test(timeout = FIVE_MINUTES_TIMEOUT *2) | ||
public void test_Math32() throws Exception { | ||
// On Travis 454sec | ||
if (!testShouldBeRun()) { return; } | ||
NopolContext nopolContext = nopolConfigFor("Math32"); | ||
NopolResult result = new NoPol(nopolContext).build(); | ||
assertEquals(1, result.getPatches().size()); | ||
} | ||
|
||
@Test(timeout = FIVE_MINUTES_TIMEOUT *2) | ||
public void test_Math33() throws Exception { | ||
// on Travis: 458sec | ||
if (!testShouldBeRun()) { return; } | ||
NopolContext nopolContext = nopolConfigFor("Math33"); | ||
NopolResult result = new NoPol(nopolContext).build(); | ||
assertEquals(1, result.getPatches().size()); | ||
} | ||
|
||
// Math40 Timeout on Travis on March 12 | ||
// @Test(timeout = FIVE_MINUTES_TIMEOUT*2) | ||
// public void test_Math40() throws Exception { | ||
// if (!testShouldBeRun()) { return; } | ||
// NopolContext nopolContext = nopolConfigFor("Math40"); | ||
// NopolResult result = new NoPol(nopolContext).build(); | ||
// assertEquals(1, result.getPatches().size()); | ||
// } | ||
|
||
@Test(timeout = FIVE_MINUTES_TIMEOUT *2) | ||
public void test_Math42() throws Exception { | ||
// on Travis: 215sec | ||
if (!testShouldBeRun()) { return; } | ||
NopolContext nopolContext = nopolConfigFor("Math42"); | ||
NopolResult result = new NoPol(nopolContext).build(); | ||
assertEquals(1, result.getPatches().size()); | ||
} | ||
|
||
@Test(timeout = TEN_MINUTES_TIMEOUT) | ||
public void test_Math49() throws Exception { | ||
// on Travis: 179sec | ||
if (!testShouldBeRun()) { return; } | ||
NopolContext nopolContext = nopolConfigFor("Math49"); | ||
NopolResult result = new NoPol(nopolContext).build(); | ||
assertEquals(1, result.getPatches().size()); | ||
} | ||
|
||
@Test(timeout = FIFTEEN_MINUTES_TIMEOUT) | ||
public void test_Math50() throws Exception { | ||
// on Travis: 8 minutes, sometimes more than 10 minutes | ||
if (!testShouldBeRun()) { return; } | ||
NopolContext nopolContext = nopolConfigFor("Math50"); | ||
NopolResult result = new NoPol(nopolContext).build(); | ||
assertEquals(1, result.getPatches().size()); | ||
} | ||
|
||
// @Test(timeout = FIVE_MINUTES_TIMEOUT *2) | ||
// public void test_Math57() throws Exception { | ||
// if (!testShouldBeRun()) { return; } | ||
// NopolContext nopolContext = nopolConfigFor("Math57"); | ||
// NopolResult result = new NoPol(nopolContext).build(); | ||
// assertEquals(1, result.getPatches().size()); | ||
// } | ||
|
||
// @Test(timeout = FIVE_MINUTES_TIMEOUT *2) | ||
// public void test_Math58() throws Exception { | ||
// // on Travis: 169sec | ||
// // it seems to crash | ||
// if (!testShouldBeRun()) { return; } | ||
// NopolContext nopolContext = nopolConfigFor("Math58"); | ||
// NopolResult result = new NoPol(nopolContext).build(); | ||
// assertEquals(1, result.getPatches().size()); | ||
// } | ||
|
||
// @Test(timeout = FIVE_MINUTES_TIMEOUT *2) | ||
// public void test_Math69() throws Exception { | ||
// // on Travis: 22sec | ||
// if (!testShouldBeRun()) { return; } | ||
// NopolContext nopolContext = nopolConfigFor("Math69"); | ||
// NopolResult result = new NoPol(nopolContext).build(); | ||
// assertEquals(1, result.getPatches().size()); | ||
// } | ||
// | ||
// @Test(timeout = FIVE_MINUTES_TIMEOUT *2) | ||
// public void test_Math71() throws Exception { | ||
// if (!testShouldBeRun()) { return; } | ||
// NopolContext nopolContext = nopolConfigFor("Math71"); | ||
// NopolResult result = new NoPol(nopolContext).build(); | ||
// assertEquals(1, result.getPatches().size()); | ||
// } | ||
// | ||
// @Test(timeout = FIVE_MINUTES_TIMEOUT *2) | ||
// public void test_Math73() throws Exception { | ||
// if (!testShouldBeRun()) { return; } | ||
// NopolContext nopolContext = nopolConfigFor("Math73"); | ||
// NopolResult result = new NoPol(nopolContext).build(); | ||
// assertEquals(1, result.getPatches().size()); | ||
// } | ||
|
||
// @Test(timeout = FIVE_MINUTES_TIMEOUT *2) | ||
// public void test_Math78() throws Exception { | ||
// if (!testShouldBeRun()) { return; } | ||
// NopolContext nopolContext = nopolConfigFor("Math78"); | ||
// NopolResult result = new NoPol(nopolContext).build(); | ||
// assertEquals(1, result.getPatches().size()); | ||
// } | ||
|
||
} | ||
|
||
|
||
|
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