Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
4b543357
Unverified
Commit
4b543357
authored
Jun 21, 2017
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✅
added progress output for Unicode tests
Travis aborts tests if they do not produce output for 10 minutes. This commit shall fix this.
parent
6f3bebff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
json.hpp
src/json.hpp
+1
-1
unit-unicode.cpp
test/src/unit-unicode.cpp
+7
-0
No files found.
src/json.hpp
View file @
4b543357
...
@@ -12914,7 +12914,7 @@ scan_number_done:
...
@@ -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
);
}
}
}
}
...
...
test/src/unit-unicode.cpp
View file @
4b543357
...
@@ -34,11 +34,18 @@ using nlohmann::json;
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment