mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 13:02:25 +02:00
Exposed JsonPairConst
This commit is contained in:
@ -40,15 +40,18 @@ TEST_CASE("JsonObjectConst::begin()/end()") {
|
|||||||
|
|
||||||
JsonObjectConst cobj = obj;
|
JsonObjectConst cobj = obj;
|
||||||
|
|
||||||
SECTION("NonConstIterator") {
|
SECTION("Iteration") {
|
||||||
JsonObjectConst::iterator it = cobj.begin();
|
JsonObjectConst::iterator it = cobj.begin();
|
||||||
REQUIRE(cobj.end() != it);
|
REQUIRE(cobj.end() != it);
|
||||||
REQUIRE(it->key() == "ab");
|
REQUIRE(it->key() == "ab");
|
||||||
REQUIRE(12 == it->value());
|
REQUIRE(12 == it->value());
|
||||||
|
|
||||||
++it;
|
++it;
|
||||||
REQUIRE(cobj.end() != it);
|
REQUIRE(cobj.end() != it);
|
||||||
REQUIRE(it->key() == "cd");
|
JsonPairConst pair = *it;
|
||||||
REQUIRE(34 == it->value());
|
REQUIRE(pair.key() == "cd");
|
||||||
|
REQUIRE(34 == pair.value());
|
||||||
|
|
||||||
++it;
|
++it;
|
||||||
REQUIRE(cobj.end() == it);
|
REQUIRE(cobj.end() == it);
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ typedef ARDUINOJSON_NAMESPACE::Integer JsonInteger;
|
|||||||
typedef ARDUINOJSON_NAMESPACE::ObjectConstRef JsonObjectConst;
|
typedef ARDUINOJSON_NAMESPACE::ObjectConstRef JsonObjectConst;
|
||||||
typedef ARDUINOJSON_NAMESPACE::ObjectRef JsonObject;
|
typedef ARDUINOJSON_NAMESPACE::ObjectRef JsonObject;
|
||||||
typedef ARDUINOJSON_NAMESPACE::Pair JsonPair;
|
typedef ARDUINOJSON_NAMESPACE::Pair JsonPair;
|
||||||
|
typedef ARDUINOJSON_NAMESPACE::PairConst JsonPairConst;
|
||||||
typedef ARDUINOJSON_NAMESPACE::String JsonString;
|
typedef ARDUINOJSON_NAMESPACE::String JsonString;
|
||||||
typedef ARDUINOJSON_NAMESPACE::UInt JsonUInt;
|
typedef ARDUINOJSON_NAMESPACE::UInt JsonUInt;
|
||||||
typedef ARDUINOJSON_NAMESPACE::VariantConstRef JsonVariantConst;
|
typedef ARDUINOJSON_NAMESPACE::VariantConstRef JsonVariantConst;
|
||||||
|
Reference in New Issue
Block a user