mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 02:08:09 +08:00
21 lines
563 B
C++
21 lines
563 B
C++
#define BOOST_TEST_MODULE "test_parse_boolean"
|
|
#include "unit_test.hpp"
|
|
|
|
#include <toml/parser.hpp>
|
|
#include "test_parse_aux.hpp"
|
|
|
|
using namespace toml;
|
|
using namespace detail;
|
|
|
|
BOOST_AUTO_TEST_CASE(test_boolean)
|
|
{
|
|
TOML11_TEST_PARSE_EQUAL(parse_boolean, "true", true);
|
|
TOML11_TEST_PARSE_EQUAL(parse_boolean, "false", false);
|
|
}
|
|
|
|
BOOST_AUTO_TEST_CASE(test_boolean_value)
|
|
{
|
|
TOML11_TEST_PARSE_EQUAL_VALUE(parse_value<toml::value>, "true", toml::value( true));
|
|
TOML11_TEST_PARSE_EQUAL_VALUE(parse_value<toml::value>, "false", toml::value(false));
|
|
}
|