Templatized all functions using String or std::string

* Removed `ArduinoJson::String`
* Removed `JsonVariant::defaultValue<T>()`
* Removed non-template `JsonObject::get()` and `JsonArray.get()`
* Fixed support for `StringSumHelper` (issue #184)
* Replaced `ARDUINOJSON_USE_ARDUINO_STRING` by `ARDUINOJSON_ENABLE_STD_STRING` and `ARDUINOJSON_ENABLE_ARDUINO_STRING` (issue #378)
* Added example `StringExample.ino` to show where `String` can be used
This commit is contained in:
Benoit Blanchon
2016-11-06 17:48:32 +01:00
parent 7ad57f1c33
commit aa2ef79e55
31 changed files with 622 additions and 545 deletions

View File

@ -5,11 +5,11 @@
// https://github.com/bblanchon/ArduinoJson
// If you like this project, please add a star!
#include <gtest/gtest.h>
#include <ArduinoJson.h>
#include <gtest/gtest.h>
TEST(JsonObject_Invalid_Tests, SubscriptFails) {
ASSERT_FALSE(JsonObject::invalid()[0].success());
ASSERT_FALSE(JsonObject::invalid()["key"].success());
}
TEST(JsonObject_Invalid_Tests, AddFails) {