diff options
author | Jon Bratseth <bratseth@gmail.com> | 2023-01-16 12:01:24 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2023-01-16 12:01:24 +0100 |
commit | 53786a4c4bde1b53989916cf1eee6321d11d7e4d (patch) | |
tree | 53489e62e13c427ed40e943e1309b597aca90703 /vespajlib | |
parent | 3f07bf2d9e6eae85c50aa8734694273c983f959b (diff) |
Test direct rendering
Diffstat (limited to 'vespajlib')
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/tensor/serialization/JsonFormatTestCase.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/serialization/JsonFormatTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/serialization/JsonFormatTestCase.java index 7f9705d33bd..7c7391ff895 100644 --- a/vespajlib/src/test/java/com/yahoo/tensor/serialization/JsonFormatTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/tensor/serialization/JsonFormatTestCase.java @@ -22,7 +22,9 @@ public class JsonFormatTestCase { public void testDirectValue() { assertDecoded("tensor(x{}):{a:2, b:3}", "{'a':2.0, 'b':3.0}"); assertDecoded("tensor(x{}):{a:2, b:3}", "{'a':2.0, 'b':3.0}"); - assertDecoded("tensor(x[2]):[2, 3]]", "[2.0, 3.0]"); + assertDecoded("tensor(x[2]):[1.0, 2.0]]", "[1, 2]"); + assertDecoded("tensor(x[2],y[3]):[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]", "[1, 2, 3, 4, 5, 6]"); + assertDecoded("tensor(x[2],y[3]):[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]", "[[1, 2, 3], [4, 5, 6]]"); assertDecoded("tensor(x{},y[2]):{a:[2, 3], b:[4, 5]}", "{'a':[2, 3], 'b':[4, 5]}"); assertDecoded("tensor(x{},y{}):{{x:a,y:0}:2, {x:b,y:1}:3}", "[{'address':{'x':'a','y':'0'},'value':2}, {'address':{'x':'b','y':'1'},'value':3}]"); |