mirror of
https://github.com/nlohmann/json.git
synced 2024-08-23 05:22:28 +02:00
✅ added progress output for Unicode tests
Travis aborts tests if they do not produce output for 10 minutes. This commit shall fix this.
This commit is contained in:
parent
6f3bebff5c
commit
4b5433578a
|
@ -12914,7 +12914,7 @@ scan_number_done:
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
// we expected a value
|
// the last token was unexpected; we expected a value
|
||||||
expect(lexer::token_type::literal_or_value);
|
expect(lexer::token_type::literal_or_value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,11 +34,18 @@ using nlohmann::json;
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
size_t calls = 0;
|
||||||
|
|
||||||
void check_utf8string(bool success_expected, int byte1, int byte2, int byte3, int byte4);
|
void check_utf8string(bool success_expected, int byte1, int byte2, int byte3, int byte4);
|
||||||
|
|
||||||
// create and check a JSON string with up to four UTF-8 bytes
|
// create and check a JSON string with up to four UTF-8 bytes
|
||||||
void check_utf8string(bool success_expected, int byte1, int byte2 = -1, int byte3 = -1, int byte4 = -1)
|
void check_utf8string(bool success_expected, int byte1, int byte2 = -1, int byte3 = -1, int byte4 = -1)
|
||||||
{
|
{
|
||||||
|
if (++calls % 100000 == 0)
|
||||||
|
{
|
||||||
|
std::cout << calls << " UTF-8 strings checked" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
std::string json_string = "\"";
|
std::string json_string = "\"";
|
||||||
|
|
||||||
CAPTURE(byte1);
|
CAPTURE(byte1);
|
||||||
|
|
Loading…
Reference in a new issue