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
f0119757
Commit
f0119757
authored
May 23, 2012
by
Jesse Beder
Browse files
Fixed handler macros to remove warnings in gcc
parent
288c7e51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
31 deletions
+11
-31
test/handlermacros.h
test/handlermacros.h
+11
-31
No files found.
test/handlermacros.h
View file @
f0119757
...
@@ -155,56 +155,36 @@ namespace Test {
...
@@ -155,56 +155,36 @@ namespace Test {
MockEventHandler handler;\
MockEventHandler handler;\
std::stringstream stream(ex);\
std::stringstream stream(ex);\
YAML::Parser parser(stream);\
YAML::Parser parser(stream);\
while(parser.HandleNextDocument(handler))
\
while(parser.HandleNextDocument(handler))
{}
#define EXPECT_DOC_START()\
#define EXPECT_DOC_START()\
do {\
handler.Expect(Event(Event::DocStart, "", 0, ""))
handler.Expect(Event(Event::DocStart, "", 0, ""));\
} while(false)
#define EXPECT_DOC_END()\
#define EXPECT_DOC_END()\
do {\
handler.Expect(Event(Event::DocEnd, "", 0, ""))
handler.Expect(Event(Event::DocEnd, "", 0, ""));\
} while(false)
#define EXPECT_NULL(anchor)\
#define EXPECT_NULL(anchor)\
do {\
handler.Expect(Event(Event::Null, "", anchor, ""))
handler.Expect(Event(Event::Null, "", anchor, ""));\
} while(false)
#define EXPECT_ALIAS(anchor)\
#define EXPECT_ALIAS(anchor)\
do {\
handler.Expect(Event(Event::Alias, "", anchor, ""))
handler.Expect(Event(Event::Alias, "", anchor, ""));\
} while(false)
#define EXPECT_SCALAR(tag, anchor, value)\
#define EXPECT_SCALAR(tag, anchor, value)\
do {\
handler.Expect(Event(Event::Scalar, tag, anchor, value))
handler.Expect(Event(Event::Scalar, tag, anchor, value));\
} while(false)
#define EXPECT_SEQ_START(tag, anchor)\
#define EXPECT_SEQ_START(tag, anchor)\
do {\
handler.Expect(Event(Event::SeqStart, tag, anchor, ""))
handler.Expect(Event(Event::SeqStart, tag, anchor, ""));\
} while(false)
#define EXPECT_SEQ_END()\
#define EXPECT_SEQ_END()\
do {\
handler.Expect(Event(Event::SeqEnd, "", 0, ""))
handler.Expect(Event(Event::SeqEnd, "", 0, ""));\
} while(false)
#define EXPECT_MAP_START(tag, anchor)\
#define EXPECT_MAP_START(tag, anchor)\
do {\
handler.Expect(Event(Event::MapStart, tag, anchor, ""))
handler.Expect(Event(Event::MapStart, tag, anchor, ""));\
} while(false)
#define EXPECT_MAP_END()\
#define EXPECT_MAP_END()\
do {\
handler.Expect(Event(Event::MapEnd, "", 0, ""))
handler.Expect(Event(Event::MapEnd, "", 0, ""));\
} while(false)
#define DONE()\
#define DONE()\
do {\
return handler.Check()
return handler.Check();\
} while(false)
}
}
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