forked from bblanchon/ArduinoJson
Marked strdup() as deprecated (issue #658)
This commit is contained in:
1 parent
ae0b7a3ebd
commit
0612eef69b
8 files changed
+41
-58
No files matched your search
@@ -327,17 +327,5 @@ TEST_CASE("Variable Length Array") {
|
||||
|
||||
REQUIRE(std::string("world") == arr[0]);
|
||||
}
|
||||
|
||||
SECTION("JsonBuffer_strdup") {
|
||||
int i = 16;
|
||||
char vla[i];
|
||||
strcpy(vla, "world");
|
||||
|
||||
DynamicJsonBuffer jsonBuffer;
|
||||
const char* dup = jsonBuffer.strdup(vla);
|
||||
|
||||
REQUIRE(static_cast<const void*>(vla) != static_cast<const void*>(dup));
|
||||
REQUIRE(std::string("world") == dup);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user