parser_test.cpp 338 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "yaml-cpp/parser.h"
#include "mock_event_handler.h"
#include "gtest/gtest.h"

using YAML::Parser;
using YAML::MockEventHandler;
using ::testing::StrictMock;

TEST(ParserTest, Empty) {
    Parser parser;

    EXPECT_FALSE(parser);

    StrictMock<MockEventHandler> handler;
    EXPECT_FALSE(parser.HandleNextDocument(handler));
}