activate tests
This commit is contained in:
@@ -35,7 +35,7 @@ public class TestPredefinedCases {
|
||||
hierarchicalActionSets.size();
|
||||
Assert.assertEquals(hierarchicalActionSets.size(),1);
|
||||
Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if x >= 5 y += 4 @TO@ if x > 5 y += 4 @AT@ 2 @LENGTH@ 16\n" +
|
||||
"---UPD condition@@x >= 5 @TO@ x > 5 @AT@ 2 @LENGTH@ 9\n" +
|
||||
"---UPD condition@@x >= 5 @TO@ x > 5 @AT@ 2 @LENGTH@ 6\n" +
|
||||
"------UPD expr@@x >= 5 @TO@ x > 5 @AT@ 3 @LENGTH@ 6\n" +
|
||||
"---------UPD operator@@>= @TO@ > @AT@ 5 @LENGTH@ 2\n");
|
||||
|
||||
@@ -58,16 +58,14 @@ public class TestPredefinedCases {
|
||||
List<HierarchicalActionSet> hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath,false);
|
||||
hierarchicalActionSets.size();
|
||||
Assert.assertEquals(hierarchicalActionSets.size(),1);
|
||||
Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@i = 0 i < max i ++ if line ] == ' ' if line ] == '\\t' tab ++ @TO@ i = 0 i < max i ++ if line ] == ' ' space ++ if line ] == '\\t' tab ++ @AT@ 4 @LENGTH@ 60\n" +
|
||||
"---UPD block@@if line ] == ' ' if line ] == '\\t' tab ++ @TO@ if line ] == ' ' space ++ if line ] == '\\t' tab ++ @AT@ 26 @LENGTH@ 98\n" +
|
||||
"------UPD if@@if line ] == ' ' @TO@ if line ] == ' ' space ++ @AT@ 33 @LENGTH@ 16\n" +
|
||||
"---------UPD then@@ @TO@ space ++ @AT@ 54 @LENGTH@ 0\n" +
|
||||
"------------UPD block@@ @TO@ space ++ @AT@ 54 @LENGTH@ 22\n" +
|
||||
"---------------INS expr_stmt@@space ++ @TO@ block@@ @AT@ 62 @LENGTH@ 8\n" +
|
||||
"------------------INS expr@@space ++ @TO@ expr_stmt@@space ++ @AT@ 62 @LENGTH@ 8\n" +
|
||||
"---------------------INS name@@space @TO@ expr@@space ++ @AT@ 62 @LENGTH@ 5\n" +
|
||||
"---------------------INS operator@@++ @TO@ expr@@space ++ @AT@ 67 @LENGTH@ 2\n" +
|
||||
"---------------DEL continue@@ @AT@ 62 @LENGTH@ 0\n");
|
||||
Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if line ][i == ' ' continue; @TO@ if line ][i == ' ' space ++ @AT@ 33 @LENGTH@ 28\n" +
|
||||
"---UPD then@@continue; @TO@ space ++ @AT@ 54 @LENGTH@ 9\n" +
|
||||
"------UPD block@@continue; @TO@ space ++ @AT@ 54 @LENGTH@ 9\n" +
|
||||
"---------INS expr_stmt@@space ++ @TO@ block@@continue; @AT@ 62 @LENGTH@ 8\n" +
|
||||
"------------INS expr@@space ++ @TO@ expr_stmt@@space ++ @AT@ 62 @LENGTH@ 8\n" +
|
||||
"---------------INS name@@space @TO@ expr@@space ++ @AT@ 62 @LENGTH@ 5\n" +
|
||||
"---------------INS operator@@++ @TO@ expr@@space ++ @AT@ 67 @LENGTH@ 2\n" +
|
||||
"---------DEL continue@@continue; @AT@ 62 @LENGTH@ 9\n");
|
||||
|
||||
}
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user