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
27617ec2
Commit
27617ec2
authored
Mar 03, 2011
by
Jesse Beder
Browse files
Added parsing of output to emitter tests
parent
1f9cc2d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
test/emittertests.cpp
test/emittertests.cpp
+10
-1
No files found.
test/emittertests.cpp
View file @
27617ec2
...
...
@@ -872,7 +872,16 @@ namespace Test
std
::
string
output
=
out
.
c_str
();
if
(
output
==
desiredOutput
)
{
try
{
std
::
stringstream
stream
(
output
);
YAML
::
Parser
parser
;
YAML
::
Node
node
;
parser
.
GetNextDocument
(
node
);
passed
++
;
}
catch
(
const
YAML
::
Exception
&
e
)
{
std
::
cout
<<
"Emitter test failed: "
<<
name
<<
"
\n
"
;
std
::
cout
<<
"Parsing output error: "
<<
e
.
what
()
<<
"
\n
"
;
}
}
else
{
std
::
cout
<<
"Emitter test failed: "
<<
name
<<
"
\n
"
;
std
::
cout
<<
"Output:
\n
"
;
...
...
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