mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 04:52:22 +02:00
ArduinoJson is now a header-only library (issue #199)
This commit is contained in:
@ -10,9 +10,13 @@
|
||||
|
||||
class StaticJsonBuffer_ParseObject_Tests : public testing::Test {
|
||||
protected:
|
||||
void with(JsonBuffer& jsonBuffer) { _jsonBuffer = &jsonBuffer; }
|
||||
void with(JsonBuffer& jsonBuffer) {
|
||||
_jsonBuffer = &jsonBuffer;
|
||||
}
|
||||
|
||||
void whenInputIs(const char* json) { strcpy(_jsonString, json); }
|
||||
void whenInputIs(const char* json) {
|
||||
strcpy(_jsonString, json);
|
||||
}
|
||||
|
||||
void parseMustSucceed() {
|
||||
EXPECT_TRUE(_jsonBuffer->parseObject(_jsonString).success());
|
||||
@ -74,9 +78,12 @@ TEST_F(StaticJsonBuffer_ParseObject_Tests,
|
||||
}
|
||||
|
||||
TEST_F(StaticJsonBuffer_ParseObject_Tests, CharPtrNull) {
|
||||
ASSERT_FALSE(StaticJsonBuffer<100>().parseObject((char*)0).success());
|
||||
ASSERT_FALSE(
|
||||
StaticJsonBuffer<100>().parseObject(static_cast<char*>(0)).success());
|
||||
}
|
||||
|
||||
TEST_F(StaticJsonBuffer_ParseObject_Tests, ConstCharPtrNull) {
|
||||
ASSERT_FALSE(StaticJsonBuffer<100>().parseObject((const char*)0).success());
|
||||
ASSERT_FALSE(StaticJsonBuffer<100>()
|
||||
.parseObject(static_cast<const char*>(0))
|
||||
.success());
|
||||
}
|
||||
|
Reference in New Issue
Block a user