diff --git a/test/integration/load_node_test.cpp b/test/integration/load_node_test.cpp index e9a133b74..49f2b61be 100644 --- a/test/integration/load_node_test.cpp +++ b/test/integration/load_node_test.cpp @@ -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; diff --git a/test/integration/node_spec_test.cpp b/test/integration/node_spec_test.cpp index 1754ee9b7..bfc8578a6 100644 --- a/test/integration/node_spec_test.cpp +++ b/test/integration/node_spec_test.cpp @@ -941,13 +941,6 @@ TEST(NodeSpecTest, Ex7_24_FlowNodes) { EXPECT_EQ("", doc[4].as()); } -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()); diff --git a/test/specexamples.h b/test/specexamples.h index ebe62e5b6..46e2c4c7d 100644 --- a/test/specexamples.h +++ b/test/specexamples.h @@ -687,9 +687,6 @@ const char *ex7_24 = "- *anchor\n" "- !!str"; -const char *ex7_25 = - ","; - const char *ex8_1 = "- | # Empty header\n" " literal\n"