forked from bblanchon/ArduinoJson
* Added DynamicJsonArray and StaticJsonArray * Added DynamicJsonObject and StaticJsonObject * Added DynamicJsonVariant and StaticJsonVariant * Added deserializeJson() * Removed JsonBuffer::parseArray(), parseObject() and parse() * Removed JsonBuffer::createArray() and createObject()
19 lines
416 B
C++
19 lines
416 B
C++
// ArduinoJson - arduinojson.org
|
|
// Copyright Benoit Blanchon 2014-2018
|
|
// MIT License
|
|
|
|
#include <ArduinoJson.h>
|
|
#include <catch.hpp>
|
|
|
|
using namespace Catch::Matchers;
|
|
|
|
TEST_CASE("JsonObject::get()") {
|
|
DynamicJsonObject obj;
|
|
|
|
SECTION("GetConstCharPointer_GivenStringLiteral") {
|
|
obj.set("hello", "world");
|
|
const char* value = obj.get<const char*>("hello");
|
|
REQUIRE_THAT(value, Equals("world"));
|
|
}
|
|
}
|