|
|
@@ -5,11 +5,12 @@ import org.junit.Test;
|
|
|
import static org.junit.Assert.assertEquals;
|
|
|
|
|
|
public class NewJavaFeaturesTest extends TestBase {
|
|
|
+ private static final String EXCLUSION_FILE_NAME = "blacklist.txt";
|
|
|
private static final String ROOT_DIRECTORY = "NewJavaFeatures";
|
|
|
|
|
|
@Test
|
|
|
- public void testSimpleDuplicate() throws ExitException {
|
|
|
- JPlagResult result = runJPlagWithDefaultOptions(ROOT_DIRECTORY);
|
|
|
+ public void testJavaFeatureDuplicates() throws ExitException {
|
|
|
+ JPlagResult result = runJPlagWithExclusionFile(ROOT_DIRECTORY, EXCLUSION_FILE_NAME);
|
|
|
|
|
|
// Two submissions, one comparison with 100% match:
|
|
|
assertEquals(2, result.getNumberOfSubmissions());
|
|
|
@@ -18,7 +19,7 @@ public class NewJavaFeaturesTest extends TestBase {
|
|
|
assertEquals(100, comparison.percent(), Double.MIN_NORMAL);
|
|
|
|
|
|
// Five matches that each start at the same position:
|
|
|
- assertEquals(5, comparison.matches.size());
|
|
|
+ assertEquals(4, comparison.matches.size());
|
|
|
for (Match match : comparison.matches) {
|
|
|
assertEquals(match.startA, match.startB);
|
|
|
}
|