Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
15b60e2a
Commit
15b60e2a
authored
Nov 08, 2012
by
Jesse Beder
Browse files
Added failing test for parsing a ? at the start of a value
parent
4e1bdd08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
test/core/parsertests.cpp
test/core/parsertests.cpp
+13
-0
No files found.
test/core/parsertests.cpp
View file @
15b60e2a
...
...
@@ -16,6 +16,18 @@ namespace Test
}
return
" no exception caught"
;
}
TEST
PlainScalarStartingWithQuestionMark
()
{
HANDLE
(
"foo: ?bar"
);
EXPECT_DOC_START
();
EXPECT_MAP_START
(
"?"
,
0
);
EXPECT_SCALAR
(
"?"
,
0
,
"foo"
);
EXPECT_SCALAR
(
"?"
,
0
,
"?bar"
);
EXPECT_MAP_END
();
EXPECT_DOC_END
();
DONE
();
}
}
namespace
{
...
...
@@ -44,6 +56,7 @@ namespace Test
int
passed
=
0
;
int
total
=
0
;
RunParserTest
(
&
Parser
::
NoEndOfMapFlow
,
"No end of map flow"
,
passed
,
total
);
RunParserTest
(
&
Parser
::
PlainScalarStartingWithQuestionMark
,
"Plain scalar starting with question mark"
,
passed
,
total
);
std
::
cout
<<
"Parser tests: "
<<
passed
<<
"/"
<<
total
<<
" passed
\n
"
;
return
passed
==
total
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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