aboutsummaryrefslogtreecommitdiffstats
path: root/vespajlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2024-01-30 11:29:57 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2024-01-30 11:29:57 +0100
commit935eb26498a225b2fbd807c9b35afa226fd31b22 (patch)
tree23db02c45d75e47f942256860907d4e8564a1c87 /vespajlib
parent9773ecf4f1b72940053eb14f7d72e91064c31156 (diff)
Add explicit test for "0" == 0, and "0" != "00"
Diffstat (limited to 'vespajlib')
-rw-r--r--vespajlib/src/test/java/com/yahoo/tensor/TensorAddressTestCase.java2
1 files changed, 2 insertions, 0 deletions
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() {