From 4b5433578a940b4aa54e14f19637b1f82c7220f1 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 21 Jun 2017 18:50:11 +0200 Subject: [PATCH] :white_check_mark: added progress output for Unicode tests Travis aborts tests if they do not produce output for 10 minutes. This commit shall fix this. --- src/json.hpp | 2 +- test/src/unit-unicode.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/json.hpp b/src/json.hpp index 517558c2..8512c02d 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -12914,7 +12914,7 @@ scan_number_done: default: { - // we expected a value + // the last token was unexpected; we expected a value expect(lexer::token_type::literal_or_value); } } diff --git a/test/src/unit-unicode.cpp b/test/src/unit-unicode.cpp index e55a7573..70be088e 100644 --- a/test/src/unit-unicode.cpp +++ b/test/src/unit-unicode.cpp @@ -34,11 +34,18 @@ using nlohmann::json; #include +size_t calls = 0; + 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 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 = "\""; CAPTURE(byte1);