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
89650c99
Unverified
Commit
89650c99
authored
Oct 22, 2017
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🚧
checking if #714 is now fixed with MSVC
Hopefully, #764 fixed this.
parent
b0c380b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
test/src/unit-regression.cpp
test/src/unit-regression.cpp
+27
-0
No files found.
test/src/unit-regression.cpp
View file @
89650c99
...
...
@@ -1253,4 +1253,31 @@ TEST_CASE("regression tests")
CHECK
(
i3
==
3
);
}
}
SECTION
(
"issue #714 - throw std::ios_base::failure exception when failbit set to true"
)
{
{
std
::
ifstream
is
;
is
.
exceptions
(
is
.
exceptions
()
|
std
::
ios_base
::
failbit
|
std
::
ios_base
::
badbit
);
// handle different exceptions as 'file not found', 'permission denied'
is
.
open
(
"test/data/regression/working_file.json"
);
CHECK_NOTHROW
(
nlohmann
::
json
::
parse
(
is
));
}
{
std
::
ifstream
is
;
is
.
exceptions
(
is
.
exceptions
()
|
std
::
ios_base
::
failbit
|
std
::
ios_base
::
badbit
);
// handle different exceptions as 'file not found', 'permission denied'
is
.
open
(
"test/data/json_nlohmann_tests/all_unicode.json.cbor"
);
CHECK_NOTHROW
(
nlohmann
::
json
::
from_cbor
(
is
));
}
}
}
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