mirror of https://github.com/apache/lucene.git
LUCENE-5207: add test
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene5207@1523350 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aaf9a830e6
commit
46d3371997
|
@ -43,4 +43,20 @@ public class TestJavascriptCompiler extends LuceneTestCase {
|
|||
// expected exception
|
||||
}
|
||||
}
|
||||
|
||||
public void testWrongArity() throws Exception {
|
||||
try {
|
||||
JavascriptCompiler.compile("tan()");
|
||||
fail();
|
||||
} catch (IllegalArgumentException expected) {
|
||||
assertTrue(expected.getMessage().contains("arguments for method call"));
|
||||
}
|
||||
|
||||
try {
|
||||
JavascriptCompiler.compile("tan(1, 1)");
|
||||
fail();
|
||||
} catch (IllegalArgumentException expected) {
|
||||
assertTrue(expected.getMessage().contains("arguments for method call"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue