Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add testFixTheseBooleanPlusProxErrors test to reflect some known pars…

…e failures.

I don't currently know what the fix should be, but it seems worth documenting the problem in the test suite. I've verified that these parse errors also exist in Mark's original commits. (That is, I haven't introduced these particular failures.)
  • Loading branch information...
commit f121d8a21a2a3cc41ffdb1b405813a661b73bac7 1 parent 53887c6
Chris Harris authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 src/test/com/mhs/qsol/QSolParserTest.java
View
20 src/test/com/mhs/qsol/QSolParserTest.java
@@ -251,6 +251,26 @@ public void testFixThese() {
assertEquals(expected, parse(example));
}
+ // All of these are legitimate qsol syntax, but the call to
+ // parse(example) throws an exception.
+ public void testFixTheseBooleanPlusProxErrors()
+ {
+ example = "(cat & (extend | extends | extension)) ~30 (hsr | rodino)";
+ parse(example);
+
+ example = "(\"tender offer\" & (extend | extends | extension)) ~30 rodino";
+ parse(example);
+
+ example = "(tender & (extend | extends | extension)) ~30 rodino";
+ parse(example);
+
+ example = "(tender & (extend & extends & extension)) ~30 rodino";
+ parse(example);
+
+ example = "(((\"tender offer\" & (extend | extends | extension)) ~30 (hsr | rodino)))";
+ parse(example);
+ }
+
public void testThesauraus() {
Set<String> words = new HashSet<String>();
words.add("test1");
Please sign in to comment.
Something went wrong with that request. Please try again.