mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 04:41:16 +00:00
Moved old api tests to subfolder
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
file(GLOB test_headers [a-z]*.h)
|
file(GLOB test_headers [a-z]*.h)
|
||||||
file(GLOB test_sources [a-z]*.cpp)
|
file(GLOB test_sources [a-z]*.cpp)
|
||||||
|
file(GLOB test_old_api_sources old-api/[a-z]*.cpp)
|
||||||
|
|
||||||
|
if(YAML_CPP_BUILD_OLD_API)
|
||||||
|
list(APPEND test_sources ${test_old_api_sources})
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(run-tests
|
add_executable(run-tests
|
||||||
${test_sources}
|
${test_sources}
|
||||||
|
@@ -952,10 +952,15 @@ namespace Test
|
|||||||
|
|
||||||
if(output == desiredOutput) {
|
if(output == desiredOutput) {
|
||||||
try {
|
try {
|
||||||
|
#ifdef YAML_CPP_OLD_API
|
||||||
std::stringstream stream(output);
|
std::stringstream stream(output);
|
||||||
YAML::Parser parser;
|
YAML::Parser parser;
|
||||||
YAML::Node node;
|
YAML::Node node;
|
||||||
parser.GetNextDocument(node);
|
parser.GetNextDocument(node);
|
||||||
|
#else
|
||||||
|
// Parse with the new API
|
||||||
|
#endif
|
||||||
|
|
||||||
passed++;
|
passed++;
|
||||||
} catch(const YAML::Exception& e) {
|
} catch(const YAML::Exception& e) {
|
||||||
std::cout << "Emitter test failed: " << name << "\n";
|
std::cout << "Emitter test failed: " << name << "\n";
|
||||||
|
Reference in New Issue
Block a user