From 7074892f0d55124a9373feae7b18e23855466066 Mon Sep 17 00:00:00 2001 From: HÃ¥kon Hallingstad Date: Sat, 2 Apr 2022 11:57:45 +0200 Subject: Revert "Move verification down" --- .../parser/IntermediateParserTestCase.java | 23 ++++++---------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'config-model/src/test/java/com') 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..36a72381156 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 @@ -62,27 +62,16 @@ public class IntermediateParserTestCase { @Test public void multiple_documents_disallowed() throws Exception { String input = joinLines - ("schema foo {", - " document foo {", - " }", - " document foo2 {", - " }", - "}"); + ("schema foo {", + " document foo {", + " }", + " document foo2 {", + " }", + "}"); var e = assertThrows(IllegalArgumentException.class, () -> parseString(input)); assertEquals("schema 'foo' error: already has document 'foo' so cannot add document 'foo2'", e.getMessage()); } - @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(x{},y{})\n" + - " }\n" + - "}\n")); - } - void checkFileParses(String fileName) throws Exception { System.err.println("TRY parsing: "+fileName); var schema = parseFile(fileName); -- cgit v1.2.3