mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-07 12:01:16 +00:00
chore(test): moved infiniteloop test to load_node_test suite.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:

committed by
Jesse Beder

parent
29c59c01d4
commit
c2bec4c755
@@ -368,6 +368,13 @@ TEST(NodeTest, LoadCommaSeparatedStrings) {
|
||||
EXPECT_THROW(Load(R"(,foo)"), ParserException);
|
||||
}
|
||||
|
||||
TEST(NodeSpecTest, InfiniteLoopNodes) {
|
||||
// Until yaml-cpp <= 0.8.0 this caused an infinite loop;
|
||||
// After, it triggers an exception (but LoadAll is smart enough to avoid
|
||||
// the infinite loop in any case).
|
||||
EXPECT_THROW(LoadAll(R"(,)"), ParserException);
|
||||
}
|
||||
|
||||
struct NewLineStringsTestCase {
|
||||
std::string input;
|
||||
std::string expected_content;
|
||||
|
@@ -941,13 +941,6 @@ TEST(NodeSpecTest, Ex7_24_FlowNodes) {
|
||||
EXPECT_EQ("", doc[4].as<std::string>());
|
||||
}
|
||||
|
||||
TEST(NodeSpecTest, Ex7_25_InfiniteLoopNodes) {
|
||||
// Until yaml-cpp <= 0.8.0 this caused an infinite loop;
|
||||
// After, it triggers an exception (but LoadAll is smart enough to avoid
|
||||
// the infinite loop in any case).
|
||||
ASSERT_THROW(LoadAll(ex7_25), ParserException);
|
||||
}
|
||||
|
||||
TEST(NodeSpecTest, Ex8_1_BlockScalarHeader) {
|
||||
Node doc = Load(ex8_1);
|
||||
EXPECT_EQ(4, doc.size());
|
||||
|
@@ -687,9 +687,6 @@ const char *ex7_24 =
|
||||
"- *anchor\n"
|
||||
"- !!str";
|
||||
|
||||
const char *ex7_25 =
|
||||
",";
|
||||
|
||||
const char *ex8_1 =
|
||||
"- | # Empty header\n"
|
||||
" literal\n"
|
||||
|
Reference in New Issue
Block a user