mirror of
https://github.com/nlohmann/json.git
synced 2026-07-29 15:13:04 +04:00
🎨 use Clang-Format
This commit is contained in:
@@ -13,18 +13,17 @@
|
||||
#include <nlohmann/json.hpp>
|
||||
using nlohmann::json;
|
||||
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include "make_test_data_available.hpp"
|
||||
#include <fstream>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
|
||||
TEST_CASE("Unicode (1/5)" * doctest::skip())
|
||||
{
|
||||
SECTION("\\uxxxx sequences")
|
||||
{
|
||||
// create an escaped string from a code point
|
||||
const auto codepoint_to_unicode = [](std::size_t cp)
|
||||
{
|
||||
const auto codepoint_to_unicode = [](std::size_t cp) {
|
||||
// code points are represented as a six-character sequence: a
|
||||
// reverse solidus, followed by the lowercase letter u, followed
|
||||
// by four hexadecimal digits that encode the character's code
|
||||
@@ -102,7 +101,7 @@ TEST_CASE("Unicode (1/5)" * doctest::skip())
|
||||
}
|
||||
}
|
||||
|
||||
#if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if)
|
||||
#if 0 // NOLINT(readability-avoid-unconditional-preprocessor-if)
|
||||
SECTION("incorrect sequences")
|
||||
{
|
||||
SECTION("high surrogate without low surrogate")
|
||||
@@ -223,8 +222,7 @@ TEST_CASE("Unicode (1/5)" * doctest::skip())
|
||||
}
|
||||
}
|
||||
|
||||
namespace
|
||||
{
|
||||
namespace {
|
||||
void roundtrip(bool success_expected, const std::string& s);
|
||||
|
||||
void roundtrip(bool success_expected, const std::string& s)
|
||||
@@ -265,7 +263,7 @@ void roundtrip(bool success_expected, const std::string& s)
|
||||
CHECK_THROWS_AS(_ = json::parse(ps), json::parse_error&);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
TEST_CASE("Markus Kuhn's UTF-8 decoder capability and stress test")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user