Merge pull request #1392 from mtalliance/feature/addFileInputAdapter
Feature/add file input adapter
This commit is contained in:
commit
5d390e91ff
3 changed files with 83 additions and 2 deletions
|
@ -384,6 +384,41 @@ TEST_CASE("json.org examples")
|
|||
json j;
|
||||
CHECK_NOTHROW(f >> j);
|
||||
}
|
||||
SECTION("FILE 1.json")
|
||||
{
|
||||
std::unique_ptr<std::FILE, decltype(&std::fclose)> f(std::fopen("test/data/json.org/1.json", "r"), &std::fclose);
|
||||
json j;
|
||||
CHECK_NOTHROW(j.parse(f.get()));
|
||||
}
|
||||
|
||||
SECTION("FILE 2.json")
|
||||
{
|
||||
std::unique_ptr<std::FILE, decltype(&std::fclose)> f(std::fopen("test/data/json.org/2.json", "r"), &std::fclose);
|
||||
json j;
|
||||
CHECK_NOTHROW(j.parse(f.get()));
|
||||
}
|
||||
|
||||
SECTION("FILE 3.json")
|
||||
{
|
||||
std::unique_ptr<std::FILE, decltype(&std::fclose)> f(std::fopen("test/data/json.org/3.json", "r"), &std::fclose);
|
||||
json j;
|
||||
CHECK_NOTHROW(j.parse(f.get()));
|
||||
}
|
||||
|
||||
SECTION("FILE 4.json")
|
||||
{
|
||||
std::unique_ptr<std::FILE, decltype(&std::fclose)> f(std::fopen("test/data/json.org/4.json", "r"), &std::fclose);
|
||||
json j;
|
||||
CHECK_NOTHROW(j.parse(f.get()));
|
||||
}
|
||||
|
||||
SECTION("FILE 5.json")
|
||||
{
|
||||
std::unique_ptr<std::FILE, decltype(&std::fclose)> f(std::fopen("test/data/json.org/5.json", "r"), &std::fclose);
|
||||
json j;
|
||||
CHECK_NOTHROW(j.parse(f.get()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TEST_CASE("RFC 7159 examples")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue