You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify testing for locations in error messages. Currently we write
ml("from {x, y} group")
.assertParseThrowsParseException(
startsWith("Encountered \" \"group\" \"group \"\" at line 1, column 13."));
but we should instead write something like
ml("from {x, y} $group")
.withErrorAt('$')
.assertParseThrowsParseException(loc ->
startsWith("Encountered \" \"group\" \"group \"\" at " + loc + "."));
The new withErrorAt method scans the source string for $, removes the $, and sets the error location to where it was (line 1, column 13). The assertParseThrowsParseException method now accepts a Function<String, Matcher<String>>, and the first argument is the error location.
The text was updated successfully, but these errors were encountered:
Simplify testing for locations in error messages. Currently we write
but we should instead write something like
The new
withErrorAt
method scans the source string for$
, removes the$
, and sets the error location to where it was (line 1, column 13). TheassertParseThrowsParseException
method now accepts aFunction<String, Matcher<String>>
, and the first argument is the error location.The text was updated successfully, but these errors were encountered: