aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/test
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@vespa.ai>2023-11-22 10:39:54 +0100
committerJon Bratseth <bratseth@vespa.ai>2023-11-22 10:39:54 +0100
commitaf2e96edf72cc3777c1bbb34812c8151c4ac4622 (patch)
tree725309875e65c1399704fda559985ae3b653917f /searchlib/src/test
parent436e3d2d632c7f57ddb955a04feaefb38c835e81 (diff)
Allow unicode
Diffstat (limited to 'searchlib/src/test')
-rw-r--r--searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java
index 9626059a42e..0088e3eb9de 100644
--- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java
+++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java
@@ -220,6 +220,7 @@ public class EvaluationTestCase {
@Test
public void testTensorEvaluation() {
EvaluationTester tester = new EvaluationTester();
+
tester.assertEvaluates("{}", "tensor0", "{}");
// tensor map
@@ -227,6 +228,9 @@ public class EvaluationTestCase {
"map(tensor0, f(x) (log10(x)))", "{ {d1:0}:10, {d1:1}:100, {d1:2}:1000 }");
tester.assertEvaluates("{ {d1:0}:4, {d1:1}:9, {d1:2 }:16 }",
"map(tensor0, f(x) (x * x))", "{ {d1:0}:2, {d1:1}:3, {d1:2}:4 }");
+ // Unicode key
+ tester.assertEvaluates("tensor<int8>(drink{}):{Martini\uD83C\uDF78:30.0}",
+ "tensor<int8>(drink{}): {\"Martini\uD83C\uDF78\": 30 }");
// -- tensor map shorthands
tester.assertEvaluates("{ {d1:0}:0, {d1:1}:1, {d1:2 }:0 }",
"tensor0 == 3", "{ {d1:0}:2, {d1:1}:3, {d1:2}:4 }");