fix whiler
This commit is contained in:
@@ -68,7 +68,6 @@ public class TestPredefinedCases {
|
||||
"---------------DEL continue@@ @AT@ 62 @LENGTH@ 0\n");
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWhileCase1() throws IOException {
|
||||
|
||||
@@ -85,17 +84,17 @@ public class TestPredefinedCases {
|
||||
List<HierarchicalActionSet> hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath);
|
||||
hierarchicalActionSets.size();
|
||||
Assert.assertEquals(hierarchicalActionSets.size(),1);
|
||||
//TODO fixme
|
||||
// Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@i = 0 i < max i ++ line ] == ' ' line ] == '\\t' tab ++ @TO@ i = 0 i < max i ++ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 4 @LENGTH@ 54\n" +
|
||||
// "---UPD block@@line ] == ' ' line ] == '\\t' tab ++ @TO@ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 26 @LENGTH@ 98\n" +
|
||||
// "------UPD if@@line ] == ' ' @TO@ line ] == ' ' space ++ @AT@ 33 @LENGTH@ 13\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 do@@y = f x x -- print x x > 0 @TO@ y = f x x -- x > 0 @AT@ 0 @LENGTH@ 62\n" +
|
||||
"---UPD block@@y = f x x -- print x @TO@ y = f x x -- @AT@ 3 @LENGTH@ 42\n" +
|
||||
"------DEL expr_stmt@@print x @AT@ 33 @LENGTH@ 7\n" +
|
||||
"---------DEL expr@@print x @AT@ 33 @LENGTH@ 7\n" +
|
||||
"------------DEL call@@print x @AT@ 33 @LENGTH@ 7\n" +
|
||||
"---------------DEL name@@print @AT@ 33 @LENGTH@ 5\n" +
|
||||
"---------------DEL argument_list@@x @AT@ 38 @LENGTH@ 4\n" +
|
||||
"------------------DEL argument@@x @AT@ 39 @LENGTH@ 1\n" +
|
||||
"---------------------DEL expr@@x @AT@ 39 @LENGTH@ 1\n" +
|
||||
"------------------------DEL name@@x @AT@ 39 @LENGTH@ 1\n");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user