mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-22 23:07:29 +02:00
Parse empty object
This commit is contained in:
20
test/JsonParser_Object_Tests.cpp
Normal file
20
test/JsonParser_Object_Tests.cpp
Normal file
@ -0,0 +1,20 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <ArduinoJson/StaticJsonBuffer.hpp>
|
||||
|
||||
using namespace ArduinoJson;
|
||||
|
||||
class JsonParser_Object_Test : public testing::Test
|
||||
{
|
||||
protected:
|
||||
|
||||
|
||||
};
|
||||
|
||||
TEST_F(JsonParser_Object_Test, EmptyObject)
|
||||
{
|
||||
StaticJsonBuffer<10> jsonBuffer;
|
||||
char jsonString[] = "{}";
|
||||
JsonObject object = jsonBuffer.parseObject(jsonString);
|
||||
|
||||
EXPECT_TRUE(object.success());
|
||||
}
|
Reference in New Issue
Block a user