We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ElementProxy::add()
1 parent b4ca901 commit 264538bCopy full SHA for 264538b
extras/tests/JsonDocument/ElementProxy.cpp
@@ -26,13 +26,25 @@ TEST_CASE("ElementProxy::add()") {
26
REQUIRE(doc.as<std::string>() == "[[\"world\"]]");
27
}
28
29
- SECTION("set(char[])") {
+ SECTION("add(char[])") {
30
char s[] = "world";
31
ep.add(s);
32
strcpy(s, "!!!!!");
33
34
35
36
+
37
+#ifdef HAS_VARIABLE_LENGTH_ARRAY
38
+ SECTION("set(vla)") {
39
+ size_t i = 8;
40
+ char vla[i];
41
+ strcpy(vla, "world");
42
43
+ ep.add(vla);
44
45
+ REQUIRE(doc.as<std::string>() == "[[\"world\"]]");
46
+ }
47
+#endif
48
49
50
TEST_CASE("ElementProxy::clear()") {
0 commit comments