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
288c7e51
Commit
288c7e51
authored
May 23, 2012
by
Jesse Beder
Browse files
Added seq/map gen emitter tests
parent
52813050
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2356 additions
and
0 deletions
+2356
-0
test/create-emitter-tests.py
test/create-emitter-tests.py
+6
-0
test/genemittertests.h
test/genemittertests.h
+2350
-0
No files found.
test/create-emitter-tests.py
View file @
288c7e51
...
@@ -104,6 +104,12 @@ def gen_templates():
...
@@ -104,6 +104,12 @@ def gen_templates():
[[
scalar
(
'foo'
)],
[
seq_start
(),
scalar
(
'foo'
),
seq_end
()],
[
map_start
(),
scalar
(
'foo'
),
scalar
(
'bar'
),
map_end
()]],
[[
scalar
(
'foo'
)],
[
seq_start
(),
scalar
(
'foo'
),
seq_end
()],
[
map_start
(),
scalar
(
'foo'
),
scalar
(
'bar'
),
map_end
()]],
[
map_end
()],
[
map_end
()],
[
doc_end
(
True
)]]
[
doc_end
(
True
)]]
yield
[[
doc_start
(
True
)],
[
seq_start
()],
[[
scalar
(
'foo'
)],
[
seq_start
(),
scalar
(
'foo'
),
seq_end
()],
[
map_start
(),
scalar
(
'foo'
),
scalar
(
'bar'
),
map_end
()]],
[[
scalar
(
'foo'
)],
[
seq_start
(),
scalar
(
'foo'
),
seq_end
()],
[
map_start
(),
scalar
(
'foo'
),
scalar
(
'bar'
),
map_end
()]],
[
seq_end
()],
[
doc_end
(
True
)]]
def
expand
(
template
):
def
expand
(
template
):
if
len
(
template
)
==
0
:
if
len
(
template
)
==
0
:
...
...
test/genemittertests.h
View file @
288c7e51
This diff is collapsed.
Click to expand it.
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