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
ad275901
Commit
ad275901
authored
May 22, 2012
by
Jesse Beder
Browse files
Switched single quoted test to positive test (since we just convert to double quoted)
parent
a6fe313d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
test/emittertests.cpp
test/emittertests.cpp
+9
-9
No files found.
test/emittertests.cpp
View file @
ad275901
...
...
@@ -938,7 +938,14 @@ namespace Test
" intelligence: 56"
;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////
void
ForceSingleQuotedToDouble
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredOutput
)
{
out
<<
YAML
::
SingleQuoted
<<
"Hello
\n
World"
;
desiredOutput
=
"Hello
\\
nWorld"
;
}
////////////////////////////////////////////////////////////////////////////////
// incorrect emitting
void
ExtraEndSeq
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredError
)
...
...
@@ -962,13 +969,6 @@ namespace Test
out
<<
YAML
::
EndMap
;
}
void
BadSingleQuoted
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredError
)
{
desiredError
=
YAML
::
ErrorMsg
::
SINGLE_QUOTED_CHAR
;
out
<<
YAML
::
SingleQuoted
<<
"Hello
\n
World"
;
}
void
InvalidAnchor
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredError
)
{
desiredError
=
YAML
::
ErrorMsg
::
INVALID_ANCHOR
;
...
...
@@ -1135,10 +1135,10 @@ namespace Test
RunEmitterTest
(
&
Emitter
::
DashInBlockContext
,
"dash in block context"
,
passed
,
total
);
RunEmitterTest
(
&
Emitter
::
HexAndOct
,
"hex and oct"
,
passed
,
total
);
RunEmitterTest
(
&
Emitter
::
CompactMapWithNewline
,
"compact map with newline"
,
passed
,
total
);
RunEmitterTest
(
&
Emitter
::
ForceSingleQuotedToDouble
,
"force single quoted to double"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
ExtraEndSeq
,
"extra EndSeq"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
ExtraEndMap
,
"extra EndMap"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
BadSingleQuoted
,
"bad single quoted string"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
InvalidAnchor
,
"invalid anchor"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
InvalidAlias
,
"invalid alias"
,
passed
,
total
);
RunEmitterErrorTest
(
&
Emitter
::
BadLocalTag
,
"bad local tag"
,
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