summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java')
-rw-r--r--vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java
index 9183ad68956..5e91679c412 100644
--- a/vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java
+++ b/vespajlib/src/test/java/com/yahoo/tensor/IndexedTensorTestCase.java
@@ -56,10 +56,10 @@ public class IndexedTensorTestCase {
assertEquals(emptyWithDimensions, emptyWithDimensionsFromString);
IndexedTensor emptyWithDimensionsIndexed = (IndexedTensor)emptyWithDimensions;
- assertEquals(0, emptyWithDimensionsIndexed.size(0));
- assertEquals(0, emptyWithDimensionsIndexed.size(1));
+ assertEquals(0, emptyWithDimensionsIndexed.length(0));
+ assertEquals(0, emptyWithDimensionsIndexed.length(1));
}
-
+
@Test
public void testBoundBuilding() {
TensorType type = new TensorType.Builder().indexed("v", vSize)
@@ -108,7 +108,7 @@ public class IndexedTensorTestCase {
for (int y = 0; y < ySize; y++)
for (int x = xSize - 1; x >= 0; x--)
for (int z = 0; z < zSize; z++)
- assertEquals(value(v, w, x, y, z), (int) tensor.get(TensorAddress.of(v, w, x, y, z)));
+ assertEquals(value(v, w, x, y, z), (int) tensor.get(new TensorAddress(v, w, x, y, z)));
// Lookup from cells
Map<TensorAddress, Double> cells = tensor.cells();
@@ -118,7 +118,7 @@ public class IndexedTensorTestCase {
for (int y = 0; y < ySize; y++)
for (int x = xSize - 1; x >= 0; x--)
for (int z = 0; z < zSize; z++)
- assertEquals(value(v, w, x, y, z), cells.get(TensorAddress.of(v, w, x, y, z)).intValue());
+ assertEquals(value(v, w, x, y, z), cells.get(new TensorAddress(v, w, x, y, z)).intValue());
// Lookup from iterator
Map<TensorAddress, Double> cellsOfIterator = new HashMap<>();
@@ -132,7 +132,7 @@ public class IndexedTensorTestCase {
for (int y = 0; y < ySize; y++)
for (int x = xSize - 1; x >= 0; x--)
for (int z = 0; z < zSize; z++)
- assertEquals(value(v, w, x, y, z), cellsOfIterator.get(TensorAddress.of(v, w, x, y, z)).intValue());
+ assertEquals(value(v, w, x, y, z), cellsOfIterator.get(new TensorAddress(v, w, x, y, z)).intValue());
}