From 935eb26498a225b2fbd807c9b35afa226fd31b22 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 30 Jan 2024 11:29:57 +0100 Subject: Add explicit test for "0" == 0, and "0" != "00" --- vespajlib/src/test/java/com/yahoo/tensor/TensorAddressTestCase.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vespajlib') diff --git a/vespajlib/src/test/java/com/yahoo/tensor/TensorAddressTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/TensorAddressTestCase.java index 204d5447b91..a24475a6a24 100644 --- a/vespajlib/src/test/java/com/yahoo/tensor/TensorAddressTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/tensor/TensorAddressTestCase.java @@ -33,6 +33,7 @@ public class TensorAddressTestCase { } @Test void testStringVersusNumericAddressEquality() { + equal(ofLabels("0"), of(0)); equal(ofLabels("1"), of(1)); } @Test @@ -40,6 +41,7 @@ public class TensorAddressTestCase { notEqual(ofLabels("1"), ofLabels("2")); notEqual(of(1), of(2)); notEqual(ofLabels("1"), ofLabels("01")); + notEqual(ofLabels("0"), ofLabels("00")); } @Test void testDimensionsEffectsEqualityAndHash() { -- cgit v1.2.3