diff options
author | Lester Solbakken <lester.solbakken@gmail.com> | 2023-12-15 09:07:40 +0100 |
---|---|---|
committer | Lester Solbakken <lester.solbakken@gmail.com> | 2023-12-15 09:07:40 +0100 |
commit | 0b137997746a2b467213b8e5fceea460813a868b (patch) | |
tree | 74746679c7a8d688f5834317e5e8f667e3ef2af0 /vespajlib/src/test/java/com/yahoo/tensor/functions | |
parent | 29d71b65bd854881d741b41c5522b8954b9bdd2e (diff) |
Add string indicators for dimensions with spaces in slice tostring
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/tensor/functions')
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/tensor/functions/SliceTestCase.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/functions/SliceTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/functions/SliceTestCase.java index 94a06a416a5..3a21017ded4 100644 --- a/vespajlib/src/test/java/com/yahoo/tensor/functions/SliceTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/tensor/functions/SliceTestCase.java @@ -135,4 +135,13 @@ public class SliceTestCase { .toString()); } + @Test + public void testLabelsWithSpaceToString() { + Tensor input = Tensor.from("tensor(key{}):{a:1, 'b c':2}"); + assertEquals("tensor(key{}):{a:1.0, 'b c':2.0}{key:'b c'}", + new Slice<>(new ConstantTensor<>(input), + List.of(new Slice.DimensionValue<>("key", "b c"))) + .toString()); + } + } |