Skip the exception-only checks of the stream input tests without exceptions

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-17 08:29:47 +02:00
1 parent c7a9780936
commit f25c6543aa
2 files changed
+9

No files matched your search

+3
View File
@@ -170,6 +170,7 @@ TEST_CASE("parsing from a FILE*")
check_unlocked(f.get());
}
#if !defined(JSON_NOEXCEPTION)
SECTION("the file is unlocked after a parse error")
{
const file_ptr f = open_with(name, "[1, 2, x]");
@@ -186,6 +187,8 @@ TEST_CASE("parsing from a FILE*")
CHECK(std::string(rest.data()) == "]");
}
#endif // !defined(JSON_NOEXCEPTION)
SECTION("the file can be parsed again and read with stdio afterwards")
{
const file_ptr f = open_with(name, "[1] [2] tail");