mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-11-09 14:20:06 +00:00
10fd14f8b9
This patch consistently changes the inclusion order for unit test files to the following: 1. The header of the unit under test (using <> includes). 2. The unit_test.hpp header (using "" includes). 3. Any additional auxiliary test headers (using "" includes and sorted alphabetically). 4. Additional system headers needed for the test (using <> includes and sorted alphabetically). 5. Conditionally included system headers (using <> includes). Putting the unit under test's header at the very beginning has the advantage of also testing that the header is self-contained. It also makes it very quick to tell what unit is tested in this file.
20 lines
516 B
C++
20 lines
516 B
C++
#include <toml/parser.hpp>
|
|
|
|
#include "unit_test.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));
|
|
}
|