diff options
Diffstat (limited to 'config-model/src/test/java/com/yahoo/schema/processing')
-rw-r--r-- | config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java b/config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java index 67c77508e3b..9164f361a92 100644 --- a/config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java +++ b/config-model/src/test/java/com/yahoo/schema/processing/TensorFieldTestCase.java @@ -55,6 +55,17 @@ public class TensorFieldTestCase { } @Test + public void requireThatIndexedTensorAttributeCannotBeFastRank() throws ParseException { + try { + createFromString(getSd("field f1 type tensor(x[3]) { indexing: attribute \n attribute: fast-rank }")); + fail("Expected exception"); + } + catch (IllegalArgumentException e) { + assertEquals("The attribute 'f1' (tensor(x[3])) does not support 'fast-rank'. Only supported for tensor types with at least one mapped dimension", e.getMessage()); + } + } + + @Test public void requireThatIllegalTensorTypeSpecThrowsException() throws ParseException { try { createFromString(getSd("field f1 type tensor(invalid) { indexing: attribute }")); |