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
b2f9a61c
"tests/vscode:/vscode.git/clone" did not exist on "9ecd924859d7840df321700bc82333edb3bcc4a5"
Commit
b2f9a61c
authored
May 22, 2012
by
Jesse Beder
Browse files
Fixed emitter tests with newlines
parent
f4278fe3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
test/emittertests.cpp
test/emittertests.cpp
+6
-6
No files found.
test/emittertests.cpp
View file @
b2f9a61c
...
...
@@ -540,7 +540,7 @@ namespace Test
{
out
<<
YAML
::
Flow
<<
YAML
::
BeginSeq
<<
"foo"
<<
YAML
::
Comment
(
"foo!"
)
<<
"bar"
<<
YAML
::
EndSeq
;
desiredOutput
=
"[foo # foo!
\n
,
bar]"
;
desiredOutput
=
"[foo
,
# foo!
\n
bar]"
;
}
void
CommentInFlowMap
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredOutput
)
...
...
@@ -551,7 +551,7 @@ namespace Test
out
<<
YAML
::
Key
<<
"baz"
<<
YAML
::
Value
<<
"baz value"
<<
YAML
::
Comment
(
"baz!"
);
out
<<
YAML
::
EndMap
;
desiredOutput
=
"{foo: foo value, bar: bar value # bar!
\n
,
baz: baz value # baz!
\n
}"
;
desiredOutput
=
"{foo: foo value, bar: bar value
,
# bar!
\n
baz: baz value # baz!
\n
}"
;
}
void
Indentation
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredOutput
)
...
...
@@ -721,7 +721,7 @@ namespace Test
out
<<
YAML
::
Flow
<<
YAML
::
BeginSeq
;
out
<<
"a"
<<
YAML
::
Newline
<<
"b"
<<
"c"
<<
YAML
::
Newline
<<
"d"
;
out
<<
YAML
::
EndSeq
;
desiredOutput
=
"[a
\n
,
b, c
\n
,
d]"
;
desiredOutput
=
"[a
,
\n
b, c
,
\n
d]"
;
}
void
NewlineInBlockMap
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredOutput
)
...
...
@@ -731,7 +731,7 @@ namespace Test
out
<<
YAML
::
Key
<<
"b"
<<
YAML
::
Newline
<<
YAML
::
Value
<<
"bar"
;
out
<<
YAML
::
LongKey
<<
YAML
::
Key
<<
"c"
<<
YAML
::
Newline
<<
YAML
::
Value
<<
"car"
;
out
<<
YAML
::
EndMap
;
desiredOutput
=
"a: foo
\n
\n
b: bar
\n
? c
\n\n
: car"
;
desiredOutput
=
"a: foo
\n
b:
\n
bar
\n
? c
\n\n
: car"
;
}
void
NewlineInFlowMap
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredOutput
)
...
...
@@ -740,7 +740,7 @@ namespace Test
out
<<
YAML
::
Key
<<
"a"
<<
YAML
::
Value
<<
"foo"
<<
YAML
::
Newline
;
out
<<
YAML
::
Key
<<
"b"
<<
YAML
::
Value
<<
"bar"
;
out
<<
YAML
::
EndMap
;
desiredOutput
=
"{a: foo
\n
,
b: bar}"
;
desiredOutput
=
"{a: foo
,
\n
b: bar}"
;
}
void
LotsOfNewlines
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredOutput
)
...
...
@@ -756,7 +756,7 @@ namespace Test
out
<<
YAML
::
LongKey
<<
YAML
::
Key
<<
"f"
<<
YAML
::
Newline
<<
YAML
::
Value
<<
"foo"
;
out
<<
YAML
::
EndMap
;
out
<<
YAML
::
EndSeq
;
desiredOutput
=
"- a
\n\n
-
\n
- b
\n
- c
\n\n\n
-
\n
d: e
\n
? f
\n\n
: foo"
;
desiredOutput
=
"- a
\n\n
-
\n
- b
\n
- c
\n\n\n
-
\n
d:
\n
e
\n
? f
\n\n
: foo"
;
}
void
Binary
(
YAML
::
Emitter
&
out
,
std
::
string
&
desiredOutput
)
...
...
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