Permalink
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...
1 parent 53887c6 commit f121d8a21a2a3cc41ffdb1b405813a661b73bac7 Chris Harris committed Feb 1, 2013
Showing with 20 additions and 0 deletions.
  1. +20 −0 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");

0 comments on commit f121d8a

Please sign in to comment.