Line | |
---|
1 | // Copyright Benoit Blanchon 2014-2016
|
---|
2 | // MIT License
|
---|
3 | //
|
---|
4 | // Arduino JSON library
|
---|
5 | // https://github.com/bblanchon/ArduinoJson
|
---|
6 | // If you like this project, please add a star!
|
---|
7 |
|
---|
8 | #include <ArduinoJson.h>
|
---|
9 | #include <gtest/gtest.h>
|
---|
10 |
|
---|
11 | TEST(Issue214, IsBool) {
|
---|
12 | char json[] = "{\"ota\": {\"enabled\": true}}";
|
---|
13 | StaticJsonBuffer<JSON_OBJECT_SIZE(1) + JSON_OBJECT_SIZE(1)> jsonBuffer;
|
---|
14 | JsonObject& parsedJson = jsonBuffer.parseObject(json);
|
---|
15 | ASSERT_TRUE(parsedJson["ota"]["enabled"].is<bool>());
|
---|
16 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.