Fix SEGV in ostream_wrapper

This commit is contained in:
Jesse Beder
2014-03-22 19:15:49 -05:00
parent db82302ed0
commit 396a97050d
3 changed files with 27 additions and 5 deletions

View File

@@ -1,8 +1,8 @@
add_subdirectory(gtest-1.7.0)
include_directories(gtest-1.7.0/include)
file(GLOB test_headers [a-z]*.h)
file(GLOB test_sources [a-z]*.cpp)
file(GLOB test_headers [a-z_]*.h)
file(GLOB test_sources [a-z_]*.cpp)
file(GLOB test_core_sources core/[a-z]*.cpp)
list(APPEND test_sources ${test_core_sources})

View File

@@ -0,0 +1,15 @@
#include "yaml-cpp/ostream_wrapper.h"
#include "gtest/gtest.h"
namespace {
class OstreamWrapperTest : public ::testing::Test {
protected:
};
// Tests that the Foo::Bar() method does Abc.
TEST_F(OstreamWrapperTest, ConstructNoWrite) {
YAML::ostream_wrapper wrapper;
EXPECT_STREQ("", wrapper.str());
}
}