Skip to content

Commit

Permalink
Modified testcases.
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunhkumar committed Aug 7, 2023
1 parent 11c0722 commit 56e7b55
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/systemTest/java/soot/jimple/PropagateLineNumberTagTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ public void nullAssignment() {
assertEquals(2, useBoxes.size());
ValueBox valueBox = useBoxes.get(0);
assertTrue(valueBox instanceof ImmediateBox);
assertEquals(1, valueBox.getTags().size());
assertTrue(valueBox.getTags().get(0) instanceof LineNumberTag);
/** Now we have bytecode offset tag also. */
assertEquals(2, valueBox.getTags().size());
assertTrue(valueBox.getTags().get(1) instanceof LineNumberTag);
assertEquals(33, valueBox.getJavaSourceStartLineNumber());
}

Expand Down Expand Up @@ -110,8 +111,9 @@ public void transitiveNullAssignment() {
assertEquals(2, useBoxes.size());
ValueBox valueBox = useBoxes.get(0);
assertTrue(valueBox instanceof ImmediateBox);
assertEquals(1, valueBox.getTags().size());
assertTrue(valueBox.getTags().get(0) instanceof LineNumberTag);
/** Now we have bytecode offset tag also. */
assertEquals(2, valueBox.getTags().size());
assertTrue(valueBox.getTags().get(1) instanceof LineNumberTag);
assertEquals(39, valueBox.getJavaSourceStartLineNumber());

// second call to foo
Expand All @@ -130,8 +132,8 @@ public void transitiveNullAssignment() {
assertEquals(2, useBoxes.size());
valueBox = useBoxes.get(0);
assertTrue(valueBox instanceof ImmediateBox);
assertEquals(1, valueBox.getTags().size());
assertTrue(valueBox.getTags().get(0) instanceof LineNumberTag);
assertEquals(2, valueBox.getTags().size());
assertTrue(valueBox.getTags().get(1) instanceof LineNumberTag);
assertEquals(39, valueBox.getJavaSourceStartLineNumber());
}
}

0 comments on commit 56e7b55

Please sign in to comment.