mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +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_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
|
||||
${test_sources}
|
||||
|
@@ -952,10 +952,15 @@ namespace Test
|
||||
|
||||
if(output == desiredOutput) {
|
||||
try {
|
||||
#ifdef YAML_CPP_OLD_API
|
||||
std::stringstream stream(output);
|
||||
YAML::Parser parser;
|
||||
YAML::Node node;
|
||||
parser.GetNextDocument(node);
|
||||
#else
|
||||
// Parse with the new API
|
||||
#endif
|
||||
|
||||
passed++;
|
||||
} catch(const YAML::Exception& e) {
|
||||
std::cout << "Emitter test failed: " << name << "\n";
|
||||
|
Reference in New Issue
Block a user