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
822172c5
Commit
822172c5
authored
Dec 28, 2014
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make pretty
parent
9f562caa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
.gitignore
.gitignore
+17
-4
test/JSON_test.cc
test/JSON_test.cc
+1
-1
test/JSON_unit.cc
test/JSON_unit.cc
+3
-3
No files found.
.gitignore
View file @
822172c5
.DS_Store
src/.DS_Store
.DS_Store
aclocal.m4
autom4te.cache/*
config.log
config.status
configure
depcomp
html
*.o
benchmark/auctions.json
benchmark/citylots.json
*.Po
test/JSON_test.cc
View file @
822172c5
...
...
@@ -218,7 +218,7 @@ void test_array()
try
{
a
[
5
]
=
1
;
// assert(false);
// assert(false);
}
catch
(
const
std
::
exception
&
ex
)
{
...
...
test/JSON_unit.cc
View file @
822172c5
...
...
@@ -131,7 +131,7 @@ TEST_CASE("array")
j
+=
j
;
CHECK
(
j
.
size
()
==
21
);
// implicit transformation into an array
JSON
empty1
,
empty2
;
empty1
+=
"foo"
;
...
...
@@ -389,14 +389,14 @@ TEST_CASE("object")
// add initializer list (of pairs)
{
JSON
je
;
je
.
push_back
({
{
"one"
,
1
},
{
"two"
,
false
},
{
"three"
,
{
1
,
2
,
3
}}
});
je
.
push_back
({
{
"one"
,
1
},
{
"two"
,
false
},
{
"three"
,
{
1
,
2
,
3
}}
});
CHECK
(
je
[
"one"
].
get
<
int
>
()
==
1
);
CHECK
(
je
[
"two"
].
get
<
bool
>
()
==
false
);
CHECK
(
je
[
"three"
].
size
()
==
3
);
}
{
JSON
je
;
je
+=
{
{
"one"
,
1
},
{
"two"
,
false
},
{
"three"
,
{
1
,
2
,
3
}}
};
je
+=
{
{
"one"
,
1
},
{
"two"
,
false
},
{
"three"
,
{
1
,
2
,
3
}}
};
CHECK
(
je
[
"one"
].
get
<
int
>
()
==
1
);
CHECK
(
je
[
"two"
].
get
<
bool
>
()
==
false
);
CHECK
(
je
[
"three"
].
size
()
==
3
);
...
...
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