aboutsummaryrefslogtreecommitdiffstats
path: root/eval/src/tests
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2019-06-19 12:03:44 +0000
committerHåvard Pettersen <havardpe@oath.com>2019-06-20 09:53:20 +0000
commit733b7c1d374e6cfa4dc6b0f2e39d269448ea85e6 (patch)
treea2267ec9c1900e182ee002d6aa49136738299dbc /eval/src/tests
parent2f2c641e9aa25476d46ff97846185da05b32d6d7 (diff)
remove error_value constant
Diffstat (limited to 'eval/src/tests')
-rw-r--r--eval/src/tests/eval/function/function_test.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/eval/src/tests/eval/function/function_test.cpp b/eval/src/tests/eval/function/function_test.cpp
index 6c3839b6cc9..c2561a86d6f 100644
--- a/eval/src/tests/eval/function/function_test.cpp
+++ b/eval/src/tests/eval/function/function_test.cpp
@@ -14,20 +14,14 @@ std::vector<vespalib::string> params({"x", "y", "z", "w"});
double as_number(const Function &f) {
auto number = as<Number>(f.root());
- if (number) {
- return number->value();
- } else {
- return error_value;
- }
+ ASSERT_TRUE(number);
+ return number->value();
}
vespalib::string as_string(const Function &f) {
auto string = as<String>(f.root());
- if (string) {
- return string->value();
- } else {
- return "<error>";
- }
+ ASSERT_TRUE(string);
+ return string->value();
}
struct OperatorLayer {