Skip to content

Commit

Permalink
added test for visit not removing keyword field .src
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Sep 2, 2020
1 parent a0b0774 commit b44a55a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/org/rascalmpl/library/lang/rascal/tests/concrete/Locations.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,22 @@ test bool concreteExpressionsHaveSourceLocationsLegacy1()

test bool concreteExpressionsHaveSourceLocationsLegacy2()
= (A) `a`@\loc.length == 1;

test bool concreteExpressionsHaveSourceLocationsAfterVisitWithMatch() {
assert /int _ := (A) `a`;
t = visit((A) `a`) {
case int i => i + 1
}
return t@\loc?;
}
test bool concreteExpressionsHaveSourceLocationsAfterVisitWithNoMatch() {
t = visit((A) `a`) {
case 1239461234912634 => 123498761234896123
}
return t@\loc?;
}

0 comments on commit b44a55a

Please sign in to comment.