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
3e15b551
Commit
3e15b551
authored
Jan 17, 2017
by
Théo DELRIEU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
run make pretty
parent
fbac056c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5696 additions
and
5138 deletions
+5696
-5138
src/json.hpp
src/json.hpp
+3188
-2670
src/json.hpp.re2c
src/json.hpp.re2c
+2391
-2351
test/src/unit-conversions.cpp
test/src/unit-conversions.cpp
+4
-4
test/src/unit-noexcept.cpp
test/src/unit-noexcept.cpp
+2
-2
test/src/unit-regression.cpp
test/src/unit-regression.cpp
+1
-1
test/src/unit-udt.cpp
test/src/unit-udt.cpp
+110
-110
No files found.
src/json.hpp
View file @
3e15b551
This diff is collapsed.
Click to expand it.
src/json.hpp.re2c
View file @
3e15b551
This diff is collapsed.
Click to expand it.
test/src/unit-conversions.cpp
View file @
3e15b551
...
@@ -177,10 +177,10 @@ TEST_CASE("value conversion")
...
@@ -177,10 +177,10 @@ TEST_CASE("value conversion")
SECTION
(
"reserve is called on containers that supports it"
)
SECTION
(
"reserve is called on containers that supports it"
)
{
{
// making the call to from_json throw in order to check capacity
// making the call to from_json throw in order to check capacity
std
::
vector
<
float
>
v
;
std
::
vector
<
float
>
v
;
CHECK_THROWS_AS
(
nlohmann
::
from_json
(
j
,
v
),
std
::
logic_error
);
CHECK_THROWS_AS
(
nlohmann
::
from_json
(
j
,
v
),
std
::
logic_error
);
CHECK
(
v
.
capacity
()
==
j
.
size
());
CHECK
(
v
.
capacity
()
==
j
.
size
());
}
}
}
}
...
...
test/src/unit-noexcept.cpp
View file @
3e15b551
...
@@ -11,8 +11,8 @@ enum test
...
@@ -11,8 +11,8 @@ enum test
struct
pod
{};
struct
pod
{};
struct
pod_bis
{};
struct
pod_bis
{};
void
to_json
(
json
&
,
pod
)
noexcept
;
void
to_json
(
json
&
,
pod
)
noexcept
;
void
to_json
(
json
&
,
pod_bis
);
void
to_json
(
json
&
,
pod_bis
);
void
from_json
(
const
json
&
,
pod
)
noexcept
;
void
from_json
(
const
json
&
,
pod
)
noexcept
;
void
from_json
(
const
json
&
,
pod_bis
);
void
from_json
(
const
json
&
,
pod_bis
);
static
json
j
;
static
json
j
;
...
...
test/src/unit-regression.cpp
View file @
3e15b551
...
@@ -63,7 +63,7 @@ TEST_CASE("regression tests")
...
@@ -63,7 +63,7 @@ TEST_CASE("regression tests")
SECTION
(
"pull request #71 - handle enum type"
)
SECTION
(
"pull request #71 - handle enum type"
)
{
{
enum
{
t
=
0
,
u
=
1
};
enum
{
t
=
0
,
u
=
1
};
json
j
=
json
::
array
();
json
j
=
json
::
array
();
j
.
push_back
(
t
);
j
.
push_back
(
t
);
...
...
test/src/unit-udt.cpp
View file @
3e15b551
This diff is collapsed.
Click to expand it.
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