blob: 2c3fa8061f0a47cf297781b5b19e93748d6f5fa5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.rankingexpression.importer;
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])";
String orderedSpec = "tensor(a[3],b[],c{})";
OrderedTensorType type = OrderedTensorType.fromSpec(spec);
assertEquals(orderedSpec, type.toString());
assertEquals(orderedSpec, type.type().toString());
}
}
|