Skip to content

Commit

Permalink
Committing clang-format changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenberry committed Nov 8, 2024
1 parent 3046a56 commit 952e960
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions tests/json_test/json_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7195,22 +7195,20 @@ struct glz::meta<unknown_fields_2>

struct my_unknown_struct
{
int i = 287;
std::unordered_map<std::string, std::string> unknown;

int i = 287;
std::unordered_map<std::string, std::string> unknown;
};

template <>
struct glz::meta<my_unknown_struct> {
using T = my_unknown_struct;
static constexpr auto value = glz::object(
"i", &T::i
);
struct glz::meta<my_unknown_struct>
{
using T = my_unknown_struct;
static constexpr auto value = glz::object("i", &T::i);

static constexpr auto unknown_write{ &T::unknown };
//static constexpr auto unknown_read{
// &T::unknown
//};
static constexpr auto unknown_write{&T::unknown};
// static constexpr auto unknown_read{
// &T::unknown
// };
};

suite unknown_fields_member_test = [] {
Expand Down Expand Up @@ -7249,16 +7247,16 @@ suite unknown_fields_member_test = [] {
expect(not glz::write_json(obj, out));
expect(out == R"({"unk":"zzz","unk2":{"sub":3,"sub2":[{"a":"b"}]},"unk3":[]})") << out;
};

"my_unknown_struct"_test = [] {
my_unknown_struct obj;
std::string buffer;
expect(not glz::write < glz::opts{ .prettify = true } > (obj, buffer));
expect(not glz::write<glz::opts{.prettify = true}>(obj, buffer));
expect(buffer == R"({
"i": 287
})") << buffer;
expect(not glz::write < glz::opts{ } > (obj, buffer));

expect(not glz::write<glz::opts{}>(obj, buffer));
expect(buffer == R"({"i":287})") << buffer;
};
};
Expand Down

0 comments on commit 952e960

Please sign in to comment.