summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/query/streaming_query_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'searchlib/src/tests/query/streaming_query_test.cpp')
-rw-r--r--searchlib/src/tests/query/streaming_query_test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/searchlib/src/tests/query/streaming_query_test.cpp b/searchlib/src/tests/query/streaming_query_test.cpp
index a4e84a4d384..f5370785167 100644
--- a/searchlib/src/tests/query/streaming_query_test.cpp
+++ b/searchlib/src/tests/query/streaming_query_test.cpp
@@ -52,6 +52,15 @@ TEST(StreamingQueryTest, test_query_language)
EXPECT_EQ(da, -7);
EXPECT_EQ(db, -7);
}
+ {
+ QueryTerm q(factory.create(), "+7", "index", TermType::WORD);
+ EXPECT_TRUE(q.getAsIntegerTerm(ia, ib));
+ EXPECT_EQ(ia, 7);
+ EXPECT_EQ(ib, 7);
+ EXPECT_TRUE(q.getAsFloatTerm(da, db));
+ EXPECT_EQ(da, 7);
+ EXPECT_EQ(db, 7);
+ }
{
QueryTerm q(factory.create(), "7.5", "index", TermType::WORD);