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
b2b5e4e7
Commit
b2b5e4e7
authored
Dec 28, 2014
by
Niels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+ more test cases
parent
cd48a01b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
test/JSON_unit.cc
test/JSON_unit.cc
+14
-1
No files found.
test/JSON_unit.cc
View file @
b2b5e4e7
...
@@ -1091,8 +1091,20 @@ TEST_CASE("Iterators")
...
@@ -1091,8 +1091,20 @@ TEST_CASE("Iterators")
JSON
j7
=
"hello"
;
JSON
j7
=
"hello"
;
// operator *
// operator *
CHECK_THROWS_AS
(
*
j1
.
end
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j1
.
cend
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j2
.
end
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j2
.
cend
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j3
.
end
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j3
.
cend
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j4
.
end
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j4
.
end
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j4
.
end
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j4
.
cend
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j5
.
end
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j5
.
cend
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j6
.
end
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j6
.
cend
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j7
.
end
(),
std
::
runtime_error
);
CHECK_THROWS_AS
(
*
j7
.
cend
(),
std
::
runtime_error
);
// operator ->
// operator ->
CHECK
(
j1
.
begin
()
->
type
()
==
JSON
::
value_type
::
number
);
CHECK
(
j1
.
begin
()
->
type
()
==
JSON
::
value_type
::
number
);
...
@@ -1602,5 +1614,6 @@ TEST_CASE("Parser")
...
@@ -1602,5 +1614,6 @@ TEST_CASE("Parser")
{
{
CHECK_THROWS_AS
(
JSON
::
parse
(
""
),
std
::
invalid_argument
);
CHECK_THROWS_AS
(
JSON
::
parse
(
""
),
std
::
invalid_argument
);
CHECK_THROWS_AS
(
JSON
::
parse
(
std
::
string
(
""
)),
std
::
invalid_argument
);
CHECK_THROWS_AS
(
JSON
::
parse
(
std
::
string
(
""
)),
std
::
invalid_argument
);
CHECK_THROWS_AS
(
JSON
::
parse
(
"[1,2"
),
std
::
invalid_argument
);
}
}
}
}
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