summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/features
diff options
context:
space:
mode:
authorHaavard <havardpe@yahoo-inc.com>2016-09-06 11:16:14 +0000
committerHaavard <havardpe@yahoo-inc.com>2016-09-07 10:14:38 +0000
commit49076b17dbcba8bac9ec2c83f8ad2aea3ad15248 (patch)
treee1d2a5c1577f0d965ae7231bef798da8e477df90 /searchlib/src/tests/features
parent01eea1485f0725de204a30e8c4fcc7ae630513e7 (diff)
better handling of empty tensors
Diffstat (limited to 'searchlib/src/tests/features')
-rw-r--r--searchlib/src/tests/features/tensor_from_labels/tensor_from_labels_test.cpp6
-rw-r--r--searchlib/src/tests/features/tensor_from_weighted_set/tensor_from_weighted_set_test.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/searchlib/src/tests/features/tensor_from_labels/tensor_from_labels_test.cpp b/searchlib/src/tests/features/tensor_from_labels/tensor_from_labels_test.cpp
index 8d67ed99fdf..51764706fe1 100644
--- a/searchlib/src/tests/features/tensor_from_labels/tensor_from_labels_test.cpp
+++ b/searchlib/src/tests/features/tensor_from_labels/tensor_from_labels_test.cpp
@@ -152,13 +152,13 @@ TEST_F("require that array attribute can be converted to tensor (explicit dimens
TEST_F("require that empty tensor is created if attribute does not exists",
ExecFixture("tensorFromLabels(attribute(null))"))
{
- EXPECT_EQUAL(AsTensor("{ }"), f.execute());
+ EXPECT_EQUAL(AsEmptyTensor("tensor(null{})"), f.execute());
}
TEST_F("require that empty tensor is created if attribute type is not supported",
ExecFixture("tensorFromLabels(attribute(wsstr))"))
{
- EXPECT_EQUAL(AsTensor("{ }"), f.execute());
+ EXPECT_EQUAL(AsEmptyTensor("tensor(wsstr{})"), f.execute());
}
@@ -185,7 +185,7 @@ TEST_F("require that string array from query can be converted to tensor (explici
TEST_F("require that empty tensor is created if query parameter is not found",
ExecFixture("tensorFromLabels(query(null))"))
{
- EXPECT_EQUAL(AsTensor("{ }"), f.execute());
+ EXPECT_EQUAL(AsEmptyTensor("tensor(null{})"), f.execute());
}
TEST_MAIN() { TEST_RUN_ALL(); }
diff --git a/searchlib/src/tests/features/tensor_from_weighted_set/tensor_from_weighted_set_test.cpp b/searchlib/src/tests/features/tensor_from_weighted_set/tensor_from_weighted_set_test.cpp
index a44a0d9fa8f..0242b3206f2 100644
--- a/searchlib/src/tests/features/tensor_from_weighted_set/tensor_from_weighted_set_test.cpp
+++ b/searchlib/src/tests/features/tensor_from_weighted_set/tensor_from_weighted_set_test.cpp
@@ -160,19 +160,19 @@ TEST_F("require that weighted set from query can be converted to tensor (explici
TEST_F("require that empty tensor is created if attribute does not exists",
ExecFixture("tensorFromWeightedSet(attribute(null))"))
{
- EXPECT_EQUAL(AsTensor("{ }"), f.execute());
+ EXPECT_EQUAL(AsEmptyTensor("tensor(null{})"), f.execute());
}
TEST_F("require that empty tensor is created if attribute type is not supported",
ExecFixture("tensorFromWeightedSet(attribute(astr))"))
{
- EXPECT_EQUAL(AsTensor("{ }"), f.execute());
+ EXPECT_EQUAL(AsEmptyTensor("tensor(astr{})"), f.execute());
}
TEST_F("require that empty tensor is created if query parameter is not found",
ExecFixture("tensorFromWeightedSet(query(null))"))
{
- EXPECT_EQUAL(AsTensor("{ }"), f.execute());
+ EXPECT_EQUAL(AsEmptyTensor("tensor(null{})"), f.execute());
}
TEST_MAIN() { TEST_RUN_ALL(); }