mirror of
https://github.com/eledio-devices/thirdparty-ArduinoJson.git
synced 2025-11-01 08:48:30 +01: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