Add boolean tests
This commit is contained in:
parent
4bad5c0241
commit
a90e1637cb
|
@ -248,7 +248,7 @@ SIMDJSON_WARN_UNUSED simdjson_result<double> json_iterator::consume_root_double(
|
|||
SIMDJSON_WARN_UNUSED simdjson_result<bool> json_iterator::parse_root_bool(const uint8_t *json) noexcept {
|
||||
uint8_t tmpbuf[5+1];
|
||||
if (!copy_to_buffer(json, tmpbuf)) { logger::log_error(*this, "Not a boolean"); return INCORRECT_TYPE; }
|
||||
return consume_bool();
|
||||
return parse_bool(tmpbuf);
|
||||
}
|
||||
SIMDJSON_WARN_UNUSED simdjson_result<bool> json_iterator::consume_root_bool() noexcept {
|
||||
return parse_root_bool(advance());
|
||||
|
|
|
@ -403,12 +403,12 @@ namespace dom_api_tests {
|
|||
TEST_SUCCEED();
|
||||
}
|
||||
|
||||
// bool boolean_values() {
|
||||
// TEST_START();
|
||||
// if (!test_scalar_value<bool> ("true"_padded, true)) { return false; }
|
||||
// if (!test_scalar_value<bool> ("false"_padded, false)) { return false; }
|
||||
// TEST_SUCCEED();
|
||||
// }
|
||||
bool boolean_values() {
|
||||
TEST_START();
|
||||
if (!test_scalar_value<bool> ("true"_padded, true)) { return false; }
|
||||
if (!test_scalar_value<bool> ("false"_padded, false)) { return false; }
|
||||
TEST_SUCCEED();
|
||||
}
|
||||
|
||||
// bool null_value() {
|
||||
// TEST_START();
|
||||
|
@ -698,7 +698,7 @@ namespace dom_api_tests {
|
|||
iterate_empty_object() &&
|
||||
string_value() &&
|
||||
numeric_values() &&
|
||||
// boolean_values() &&
|
||||
boolean_values() &&
|
||||
// null_value() &&
|
||||
// document_object_index() &&
|
||||
// object_index() &&
|
||||
|
|
Loading…
Reference in New Issue