Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
yaml-cpp
Commits
ad275901
Commit
ad275901
authored
May 22, 2012
by
Jesse Beder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switched single quoted test to positive test (since we just convert to double quoted)
parent
a6fe313d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
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