mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 02:08:09 +08:00
test: update test to add rec start val
This commit is contained in:
@@ -20,11 +20,27 @@ do { \
|
||||
} while(false); \
|
||||
/**/
|
||||
|
||||
#define TOML11_TEST_PARSE_EQUAL_VAT(psr, tkn, expct) \
|
||||
do { \
|
||||
const std::string token(tkn); \
|
||||
toml::detail::location loc("test", token); \
|
||||
const auto result = psr(loc, 0); \
|
||||
BOOST_TEST(result.is_ok()); \
|
||||
if(result.is_ok()){ \
|
||||
BOOST_TEST(result.unwrap().first == expct); \
|
||||
} else { \
|
||||
std::cerr << "parser " << #psr << " failed with input `"; \
|
||||
std::cerr << token << "`.\n"; \
|
||||
std::cerr << "reason: " << result.unwrap_err() << '\n'; \
|
||||
} \
|
||||
} while(false); \
|
||||
/**/
|
||||
|
||||
#define TOML11_TEST_PARSE_EQUAL_VALUE(psr, tkn, expct) \
|
||||
do { \
|
||||
const std::string token(tkn); \
|
||||
toml::detail::location loc("test", token); \
|
||||
const auto result = psr(loc); \
|
||||
const auto result = psr(loc, 0); \
|
||||
BOOST_TEST(result.is_ok()); \
|
||||
if(result.is_ok()){ \
|
||||
BOOST_TEST(result.unwrap() == expct); \
|
||||
@@ -35,3 +51,4 @@ do { \
|
||||
} \
|
||||
} while(false); \
|
||||
/**/
|
||||
|
||||
|
Reference in New Issue
Block a user