Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
a744c626
Commit
a744c626
authored
Apr 05, 2016
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made tests independent of "C" locale
parent
0b60d970
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
test/unit.cpp
test/unit.cpp
+12
-1
No files found.
test/unit.cpp
View file @
a744c626
...
...
@@ -12383,7 +12383,18 @@ TEST_CASE("regression tests")
json
j3b
=
json
::
parse
(
"10E3"
);
json
j3c
=
json
::
parse
(
"10e3"
);
std
::
locale
::
global
(
std
::
locale
(
"de_DE"
));
// class to create a locale that would use a comma for decimals
class
CommaDecimalSeparator
:
public
std
::
numpunct
<
char
>
{
protected:
char
do_decimal_point
()
const
{
return
','
;
}
};
// change locale to mess with decimal points
std
::
locale
::
global
(
std
::
locale
(
std
::
locale
(),
new
CommaDecimalSeparator
));
CHECK
(
j1a
.
dump
()
==
"23.42"
);
CHECK
(
j1b
.
dump
()
==
"23.42"
);
...
...
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