Marked strdup() as deprecated (issue #658)

This commit is contained in:
Benoit Blanchon
2018-01-14 14:02:10 +01:00
parent ae0b7a3ebd
commit 0612eef69b
8 changed files with 41 additions and 58 deletions

View File

@ -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