🔨 further cleanup
This commit is contained in:
parent
c2d55109c1
commit
c8191c8172
5 changed files with 61 additions and 57 deletions
|
@ -65,30 +65,30 @@ TEST_CASE("lexer class")
|
|||
SECTION("numbers")
|
||||
{
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("0"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("1"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("2"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("3"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("4"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("5"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("6"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("7"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("8"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("9"),
|
||||
1).scan() == json::lexer::token_type::value_unsigned_integer));
|
||||
1).scan() == json::lexer::token_type::value_unsigned));
|
||||
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("-0"),
|
||||
2).scan() == json::lexer::token_type::value_signed_integer));
|
||||
2).scan() == json::lexer::token_type::value_integer));
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("-1"),
|
||||
2).scan() == json::lexer::token_type::value_signed_integer));
|
||||
2).scan() == json::lexer::token_type::value_integer));
|
||||
|
||||
CHECK((json::lexer(reinterpret_cast<const json::lexer::lexer_char_t*>("1.1"),
|
||||
3).scan() == json::lexer::token_type::value_float));
|
||||
|
@ -121,8 +121,8 @@ TEST_CASE("lexer class")
|
|||
CHECK((json::lexer::token_type_name(json::lexer::token_type::literal_false) == "false literal"));
|
||||
CHECK((json::lexer::token_type_name(json::lexer::token_type::literal_null) == "null literal"));
|
||||
CHECK((json::lexer::token_type_name(json::lexer::token_type::value_string) == "string literal"));
|
||||
CHECK((json::lexer::token_type_name(json::lexer::token_type::value_unsigned_integer) == "number literal"));
|
||||
CHECK((json::lexer::token_type_name(json::lexer::token_type::value_signed_integer) == "number literal"));
|
||||
CHECK((json::lexer::token_type_name(json::lexer::token_type::value_unsigned) == "number literal"));
|
||||
CHECK((json::lexer::token_type_name(json::lexer::token_type::value_integer) == "number literal"));
|
||||
CHECK((json::lexer::token_type_name(json::lexer::token_type::value_float) == "number literal"));
|
||||
CHECK((json::lexer::token_type_name(json::lexer::token_type::begin_array) == "'['"));
|
||||
CHECK((json::lexer::token_type_name(json::lexer::token_type::begin_object) == "'{'"));
|
||||
|
|
|
@ -417,7 +417,7 @@ TEST_CASE("regression tests")
|
|||
|
||||
// disabled, because locale-specific beharivor is not
|
||||
// triggered in AppVeyor for some reason
|
||||
#if 0
|
||||
#ifndef _MSC_VER
|
||||
{
|
||||
// verify that strtod now uses commas as decimal-separator
|
||||
CHECK(std::strtod("3,14", nullptr) == 3.14);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue