summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@users.noreply.github.com>2021-03-16 13:03:56 +0100
committerGitHub <noreply@github.com>2021-03-16 13:03:56 +0100
commitd2c61030d6c62b8c4889d3471d2ee5f17bb14a5f (patch)
tree60a9790b7223fce7f9da2c7355bde425968a763b /vespajlib/src/test
parent700345986b877638da6ea8d8d7160ed50ea7cd5f (diff)
Revert "Lesters/cell cast java"
Diffstat (limited to 'vespajlib/src/test')
-rw-r--r--vespajlib/src/test/java/com/yahoo/tensor/functions/CellCastTestCase.java38
1 files changed, 0 insertions, 38 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/functions/CellCastTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/functions/CellCastTestCase.java
deleted file mode 100644
index bc10ecc3abd..00000000000
--- a/vespajlib/src/test/java/com/yahoo/tensor/functions/CellCastTestCase.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.tensor.functions;
-
-import com.yahoo.tensor.Tensor;
-import com.yahoo.tensor.TensorType;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * @author lesters
- */
-public class CellCastTestCase {
-
- @Test
- public void testCellCasting() {
- Tensor tensor;
-
- tensor = Tensor.from("tensor(x[3]):[1.0, 2.0, 3.0]");
- assertEquals(TensorType.Value.DOUBLE, tensor.type().valueType());
- assertEquals(TensorType.Value.DOUBLE, tensor.cellCast(TensorType.Value.DOUBLE).type().valueType());
- assertEquals(TensorType.Value.FLOAT, tensor.cellCast(TensorType.Value.FLOAT).type().valueType());
- assertEquals(tensor, tensor.cellCast(TensorType.Value.FLOAT));
-
- tensor = Tensor.from("tensor<double>(x{}):{{x:0}:1.0,{x:1}:2.0,{x:2}:3.0}");
- assertEquals(TensorType.Value.DOUBLE, tensor.type().valueType());
- assertEquals(TensorType.Value.DOUBLE, tensor.cellCast(TensorType.Value.DOUBLE).type().valueType());
- assertEquals(TensorType.Value.FLOAT, tensor.cellCast(TensorType.Value.FLOAT).type().valueType());
- assertEquals(tensor, tensor.cellCast(TensorType.Value.FLOAT));
-
- tensor = Tensor.from("tensor<float>(x[3],y{}):{a:[1.0, 2.0, 3.0],b:[4.0,5.0,6.0]}");
- assertEquals(TensorType.Value.FLOAT, tensor.type().valueType());
- assertEquals(TensorType.Value.DOUBLE, tensor.cellCast(TensorType.Value.DOUBLE).type().valueType());
- assertEquals(TensorType.Value.FLOAT, tensor.cellCast(TensorType.Value.FLOAT).type().valueType());
- assertEquals(tensor, tensor.cellCast(TensorType.Value.DOUBLE));
- }
-
-}