Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

test_update_check: build the long-title feed outside CHECK (MSVC misread the raw string in the macro)

islandmedc3e924a54a85
diff --git a/tests/test_update_check.cpp b/tests/test_update_check.cpp
index 9833c847..8375aacf 100644
--- a/tests/test_update_check.cpp
+++ b/tests/test_update_check.cpp
@@ -121,8 +121,9 @@ TEST(update_feed_challenge_results) {
// A long title is cut to 48 bytes, never inside a character.
std::string title;
for (int i = 0; i < 40; ++i) title += "\xc3\xa9";
- CHECK(parseUpdateFeed(R"({"version":"0.6.0","download":"https://example.org/dl","challenge":{"id":"x","title":")" + title +
- "\"}}",
- u, err));
+ // (Built outside CHECK: MSVC's preprocessor misreads a raw string ending in a quote inside a macro argument.)
+ const std::string feed =
+ std::string(R"({"version":"0.6.0","download":"https://example.org/dl","challenge":{"id":"x","title":")") + title + "\"}}";
+ CHECK(parseUpdateFeed(feed, u, err));
CHECK(u.challengeTitle.size() == 48 && u.challengeTitle == title.substr(0, 48));
}