diff options
Diffstat (limited to 'config-model/src/test')
-rw-r--r-- | config-model/src/test/java/com/yahoo/searchdefinition/parser/IntermediateParserTestCase.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/parser/IntermediateParserTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/parser/IntermediateParserTestCase.java index c686a813c9f..1e0c554af81 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/parser/IntermediateParserTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/parser/IntermediateParserTestCase.java @@ -74,13 +74,14 @@ public class IntermediateParserTestCase { @Test public void backwards_path_is_disallowed() { - assertThrows("'..' is not allowed in path", IllegalArgumentException.class, - () -> parseString("schema foo {\n" + - " constant my_constant_tensor {\n" + - " file: foo/../bar\n" + - " type: tensor<float>(x{},y{})\n" + - " }\n" + - "}\n")); + assertEquals("'..' is not allowed in path", + assertThrows(IllegalArgumentException.class, + () -> parseString("schema foo {\n" + + " constant my_constant_tensor {\n" + + " file: foo/../bar\n" + + " type: tensor<float>(x{},y{})\n" + + " }\n" + + "}\n")).getMessage()); } void checkFileParses(String fileName) throws Exception { |