yaml-cpp/test/parser_test.cpp

22 lines
417 B
C++
Raw Normal View History

#include "yaml-cpp/parser.h"
#include "mock_event_handler.h"
#include "gtest/gtest.h"
using YAML::Parser;
using YAML::MockEventHandler;
2019-11-23 21:36:14 +03:00
using ::testing::StrictMock;
TEST(ParserTest, Empty) {
Parser parser;
EXPECT_FALSE(parser);
2019-11-23 21:36:14 +03:00
StrictMock<MockEventHandler> handler;
2019-11-23 21:37:30 +03:00
parser.HandleNextDocument(handler);
std::ostringstream oss;
parser.PrintTokens(oss);
EXPECT_EQ(oss.str(), "");
}