forked from bblanchon/ArduinoJson
Test that char* are copied
This commit is contained in:
1 parent
e417c137fc
commit
d3cf568d07
2 files changed
+10
-2
No files matched your search
@@ -84,4 +84,13 @@ TEST_F(JsonValueTests, BooleanValuesAreCopied)
|
||||
jsonValue1 = false;
|
||||
|
||||
EXPECT_TRUE((bool) jsonValue2);
|
||||
}
|
||||
|
||||
TEST_F(JsonValueTests, CharPointersAreCopied)
|
||||
{
|
||||
jsonValue1 = "hello";
|
||||
jsonValue2 = jsonValue1;
|
||||
jsonValue1 = "world";
|
||||
|
||||
EXPECT_STREQ("hello", (const char*) jsonValue2);
|
||||
}
|
||||
Reference in new issue
Block a user