Commit 36c63980 authored by Jesse Beder's avatar Jesse Beder
Browse files

Moved old api tests to subfolder

parent 0d1b5224
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 ...@@ -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";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment