Rename the json_view test helpers that clash in the unity build

unit-json_view_builder.cpp has its own document generator besides
json_view_test::generator, and unit-json_view_edit.cpp and
unit-json_view_image.cpp define rng() and bits() like unit-json_view.cpp,
each in an anonymous namespace. In one batch these are ambiguous or
redefined, so give the file-local ones their own names.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-21 11:05:27 +02:00
1 parent d01e6382fe
commit 52724f5ae5
3 files changed
+13 -13

No files matched your search

+2 -2
View File
@@ -173,7 +173,7 @@ void check_string(const std::string& content)
}
// a small deterministic generator of documents
struct generator
struct builder_generator
{
std::mt19937 rng{5295}; // NOLINT(cert-msc32-c,cert-msc51-cpp,bugprone-random-generator-seed)
@@ -407,7 +407,7 @@ TEST_CASE("json_view builder")
SECTION("generated documents and damaged copies")
{
generator g;
builder_generator g;
for (int i = 0; i < 3000; ++i)
{
std::string text;