예제 #1
0
 public void assertParseTermFails(String input, String errorMessage) {
   try {
     Term r = Parser.parseTerm(Parser.tokenize(input));
     fail(
         String.format(
             "Successfully parsed invalid string: %s into %s and %s",
             input, r.identifier, r.options.toString()));
   } catch (Parser.ParseError e) {
     assertEquals("Cannot parse: " + errorMessage, e.getMessage());
   }
 }
예제 #2
0
 public void assertParseTerm(String input, String identifier, ImmutableMap<String, String> options)
     throws Parser.ParseError {
   Term r = Parser.parseTerm(Parser.tokenize(input));
   assertEquals(identifier, r.identifier);
   assertEquals(options, r.options);
 }