Skip to content

Commit 1c64faf

Browse files
committed
Test MemberProxy::set()
1 parent c7e998c commit 1c64faf

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

extras/tests/JsonDocument/MemberProxy.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,18 @@ TEST_CASE("MemberProxy::set()") {
207207

208208
REQUIRE(doc.as<std::string>() == "{\"hello\":\"world\"}");
209209
}
210+
211+
#ifdef HAS_VARIABLE_LENGTH_ARRAY
212+
SECTION("set(vla)") {
213+
size_t i = 8;
214+
char vla[i];
215+
strcpy(vla, "world");
216+
217+
mp.set(vla);
218+
219+
REQUIRE(doc.as<std::string>() == "{\"hello\":\"world\"}");
220+
}
221+
#endif
210222
}
211223

212224
TEST_CASE("MemberProxy::size()") {

0 commit comments

Comments
 (0)