diff options
author | Jon Bratseth <bratseth@oath.com> | 2018-03-08 11:06:53 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@oath.com> | 2018-03-08 11:06:53 +0100 |
commit | 692d43c3c85352c8f8e40615ce37aa3d2f83b5d3 (patch) | |
tree | f661a10d076f6e8220e3ec46389b7adffefef678 /searchlib/src/test/java/com/yahoo | |
parent | 2005e5dd57b2bafd1150917560da8066b39d64f7 (diff) |
OrderedTensorType.to/from spec
Diffstat (limited to 'searchlib/src/test/java/com/yahoo')
-rw-r--r-- | searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/OrderedTensorTypeTestCase.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/OrderedTensorTypeTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/OrderedTensorTypeTestCase.java new file mode 100644 index 00000000000..beec2ab1ead --- /dev/null +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/integration/tensorflow/OrderedTensorTypeTestCase.java @@ -0,0 +1,21 @@ +package com.yahoo.searchlib.rankingexpression.integration.tensorflow; + +import com.yahoo.searchlib.rankingexpression.integration.tensorflow.importer.OrderedTensorType; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +/** + * @author bratseth + */ +public class OrderedTensorTypeTestCase { + + @Test + public void testToFromSpec() { + String spec = "tensor(b[],c{},a[3])"; + OrderedTensorType type = OrderedTensorType.fromSpec(spec); + assertEquals(spec, type.toString()); + assertEquals("tensor(a[3],b[],c{})", type.type().toString()); + } + +} |