Skip to content

Commit a215103

Browse files
committed
Test ElementProxy::set()
1 parent 1503ec3 commit a215103

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

extras/tests/JsonDocument/ElementProxy.cpp

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

167167
REQUIRE(doc.as<std::string>() == "[\"world\"]");
168168
}
169+
170+
#ifdef HAS_VARIABLE_LENGTH_ARRAY
171+
SECTION("set(VLA)") {
172+
size_t i = 8;
173+
char vla[i];
174+
strcpy(vla, "world");
175+
176+
ep.set(vla);
177+
178+
REQUIRE(doc.as<std::string>() == "[\"world\"]");
179+
}
180+
#endif
169181
}
170182

171183
TEST_CASE("ElementProxy::size()") {

0 commit comments

Comments
 (0)