summaryrefslogtreecommitdiffstats
path: root/vespajlib
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-12-14 08:37:30 +0100
committerJon Bratseth <bratseth@verizonmedia.com>2019-12-14 08:37:30 +0100
commitdba82f117a82c404c63c14884517c838a6fa500d (patch)
treead263fa60758f8fded5270b90d2bdade92c6dd21 /vespajlib
parentf5ccf036b4f7368f217a6bcbffc1699aac5eac2d (diff)
Test error messages
Diffstat (limited to 'vespajlib')
-rw-r--r--vespajlib/src/test/java/com/yahoo/tensor/TensorParserTestCase.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/TensorParserTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/TensorParserTestCase.java
index 9dfdee29845..583a964851f 100644
--- a/vespajlib/src/test/java/com/yahoo/tensor/TensorParserTestCase.java
+++ b/vespajlib/src/test/java/com/yahoo/tensor/TensorParserTestCase.java
@@ -136,6 +136,10 @@ public class TensorParserTestCase {
"{{x:0}:1-.0}");
assertIllegal("At value position 1: '1-.0' is not a valid double",
"tensor(x[1]):[1-.0]");
+ assertIllegal("At value position 5: Expected a ',' but got ']'",
+ "tensor(x[3]):[1, 2]");
+ assertIllegal("At value position 8: Expected a ']' but got ','",
+ "tensor(x[3]):[1, 2, 3, 4]");
}
private void assertIllegal(String message, String tensor) {