diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-12-08 18:20:43 -0800 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-12-08 18:20:43 -0800 |
commit | f57a596240442e437e0acb42d41d658f1507d10b (patch) | |
tree | 895b4784c11607f20cb06773aff4e3d5b42415bc /vespajlib/src/test/java/com/yahoo/tensor/TensorTypeTestCase.java | |
parent | c941dbdf91028d89a9f6310c0e79d420ca393cf3 (diff) |
Fix tests
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/tensor/TensorTypeTestCase.java')
-rw-r--r-- | vespajlib/src/test/java/com/yahoo/tensor/TensorTypeTestCase.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/TensorTypeTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/TensorTypeTestCase.java index feab8de97d6..f1148881ee5 100644 --- a/vespajlib/src/test/java/com/yahoo/tensor/TensorTypeTestCase.java +++ b/vespajlib/src/test/java/com/yahoo/tensor/TensorTypeTestCase.java @@ -49,16 +49,13 @@ public class TensorTypeTestCase { @Test public void requireThatDimensionsMustHaveUniqueNames() { - assertIllegalTensorType("tensor(x[10],y[20],x[30])", "'x[10]' and 'x[30]' have the same name"); - assertIllegalTensorType("tensor(x{},y{},x{})", "'x{}' and 'x{}' have the same name"); + assertIllegalTensorType("tensor(x[10],y[20],x[30])", "Could not add dimension x[30] as this dimension is already present"); + assertIllegalTensorType("tensor(x{},y{},x{})", "Could not add dimension x{} as this dimension is already present"); } @Test public void requireThatDimensionsAreOfSameType() { - assertIllegalTensorType("tensor(x[10],y[])", "'x[10]' does not have the same type as 'y[]'"); - assertIllegalTensorType("tensor(x[10],y{})", "'x[10]' does not have the same type as 'y{}'"); - assertIllegalTensorType("tensor(x[10],y[20],z{})", "'y[20]' does not have the same type as 'z{}'"); - assertIllegalTensorType("tensor(x[],y{})", "'x[]' does not have the same type as 'y{}'"); + assertIllegalTensorType("tensor(x[],y{})", "[x[], y{}] contains both indexed and mapped dimensions, this is not supported yet"); } @Test @@ -80,7 +77,7 @@ public class TensorTypeTestCase { private static void assertIllegalTensorType(String typeSpec, String messageSubstring) { try { TensorType.fromSpec(typeSpec); - fail("Exception exception to be thrown with message: '" + messageSubstring + "'"); + fail("Expoected exception to be thrown with message: '" + messageSubstring + "'"); } catch (IllegalArgumentException e) { assertThat(e.getMessage(), containsString(messageSubstring)); } |