Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
4730bc64
Commit
4730bc64
authored
Nov 09, 2015
by
Francis Dupont
Browse files
[4088fd] Added number unit tests
parent
b25f8ac2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/eval/tests/context_unittest.cc
View file @
4730bc64
...
...
@@ -158,6 +158,22 @@ TEST_F(EvalContextTest, string) {
checkTokenString
(
tmp
,
"foo"
);
}
// Test the parsing of a basic expression with a constant string holding
// a number.
TEST_F
(
EvalContextTest
,
number
)
{
EvalContext
eval
;
EXPECT_NO_THROW
(
parsed_
=
eval
.
parseString
(
"substring(option[123], '0', '2') == '42'"
));
EXPECT_TRUE
(
parsed_
);
parsed_
=
false
;
EXPECT_NO_THROW
(
parsed_
=
eval
.
parseString
(
"untyped: substring(option[123], '0', '2') == '42'"
));
EXPECT_TRUE
(
parsed_
);
}
// Test the parsing of a hexstring terminal
TEST_F
(
EvalContextTest
,
hexstring
)
{
EvalContext
eval
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment