2016-08-05 03:55:47 +08:00
|
|
|
/*
|
|
|
|
__ _____ _____ _____
|
|
|
|
__| | __| | | | JSON for Modern C++ (test suite)
|
2018-10-31 04:30:20 +08:00
|
|
|
| | |__ | | | | | | version 3.4.0
|
2016-08-05 03:55:47 +08:00
|
|
|
|_____|_____|_____|_|___| https://github.com/nlohmann/json
|
|
|
|
|
|
|
|
Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
2018-05-03 23:41:45 +08:00
|
|
|
SPDX-License-Identifier: MIT
|
2018-02-02 05:20:26 +08:00
|
|
|
Copyright (c) 2013-2018 Niels Lohmann <http://nlohmann.me>.
|
2016-08-05 03:55:47 +08:00
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
|
|
copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "catch.hpp"
|
|
|
|
|
|
|
|
#define private public
|
2018-01-29 18:21:11 +08:00
|
|
|
#include <nlohmann/json.hpp>
|
2016-08-05 03:55:47 +08:00
|
|
|
using nlohmann::json;
|
|
|
|
|
|
|
|
TEST_CASE("const_iterator class")
|
|
|
|
{
|
|
|
|
SECTION("construction")
|
|
|
|
{
|
|
|
|
SECTION("constructor")
|
|
|
|
{
|
|
|
|
SECTION("null")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("object")
|
|
|
|
{
|
|
|
|
json j(json::value_t::object);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("array")
|
|
|
|
{
|
|
|
|
json j(json::value_t::array);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("copy assignment")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
json::const_iterator it2(&j);
|
|
|
|
it2 = it;
|
|
|
|
}
|
2016-08-31 05:44:15 +08:00
|
|
|
|
|
|
|
SECTION("copy constructor from non-const iterator")
|
|
|
|
{
|
|
|
|
SECTION("create from uninitialized iterator")
|
|
|
|
{
|
|
|
|
const json::iterator it {};
|
|
|
|
json::const_iterator cit(it);
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("create from initialized iterator")
|
|
|
|
{
|
|
|
|
json j;
|
|
|
|
const json::iterator it = j.begin();
|
|
|
|
json::const_iterator cit(it);
|
|
|
|
}
|
|
|
|
}
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("initialization")
|
|
|
|
{
|
|
|
|
SECTION("set_begin")
|
|
|
|
{
|
|
|
|
SECTION("null")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
it.set_begin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it == j.cbegin()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("object")
|
|
|
|
{
|
|
|
|
json j(json::value_t::object);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
it.set_begin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it == j.cbegin()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("array")
|
|
|
|
{
|
|
|
|
json j(json::value_t::array);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
it.set_begin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it == j.cbegin()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("set_end")
|
|
|
|
{
|
|
|
|
SECTION("null")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
it.set_end();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it == j.cend()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("object")
|
|
|
|
{
|
|
|
|
json j(json::value_t::object);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
it.set_end();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it == j.cend()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("array")
|
|
|
|
{
|
|
|
|
json j(json::value_t::array);
|
|
|
|
json::const_iterator it(&j);
|
|
|
|
it.set_end();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it == j.cend()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("element access")
|
|
|
|
{
|
|
|
|
SECTION("operator*")
|
|
|
|
{
|
|
|
|
SECTION("null")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-07-08 04:41:22 +08:00
|
|
|
CHECK_THROWS_AS(*it, json::invalid_iterator&);
|
2017-03-03 21:34:57 +08:00
|
|
|
CHECK_THROWS_WITH(*it, "[json.exception.invalid_iterator.214] cannot get value");
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("number")
|
|
|
|
{
|
|
|
|
json j(17);
|
|
|
|
json::const_iterator it = j.cbegin();
|
|
|
|
CHECK(*it == json(17));
|
|
|
|
it = j.cend();
|
2017-07-08 04:41:22 +08:00
|
|
|
CHECK_THROWS_AS(*it, json::invalid_iterator&);
|
2017-03-03 21:34:57 +08:00
|
|
|
CHECK_THROWS_WITH(*it, "[json.exception.invalid_iterator.214] cannot get value");
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("object")
|
|
|
|
{
|
|
|
|
json j({{"foo", "bar"}});
|
|
|
|
json::const_iterator it = j.cbegin();
|
|
|
|
CHECK(*it == json("bar"));
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("array")
|
|
|
|
{
|
|
|
|
json j({1, 2, 3, 4});
|
|
|
|
json::const_iterator it = j.cbegin();
|
|
|
|
CHECK(*it == json(1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("operator->")
|
|
|
|
{
|
|
|
|
SECTION("null")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-07-27 05:59:56 +08:00
|
|
|
CHECK_THROWS_AS(std::string(it->type_name()), json::invalid_iterator&);
|
|
|
|
CHECK_THROWS_WITH(std::string(it->type_name()), "[json.exception.invalid_iterator.214] cannot get value");
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("number")
|
|
|
|
{
|
|
|
|
json j(17);
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-07-27 05:59:56 +08:00
|
|
|
CHECK(std::string(it->type_name()) == "number");
|
2016-08-05 03:55:47 +08:00
|
|
|
it = j.cend();
|
2017-07-27 05:59:56 +08:00
|
|
|
CHECK_THROWS_AS(std::string(it->type_name()), json::invalid_iterator&);
|
|
|
|
CHECK_THROWS_WITH(std::string(it->type_name()), "[json.exception.invalid_iterator.214] cannot get value");
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("object")
|
|
|
|
{
|
|
|
|
json j({{"foo", "bar"}});
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-07-27 05:59:56 +08:00
|
|
|
CHECK(std::string(it->type_name()) == "string");
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("array")
|
|
|
|
{
|
|
|
|
json j({1, 2, 3, 4});
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-07-27 05:59:56 +08:00
|
|
|
CHECK(std::string(it->type_name()) == "number");
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("increment/decrement")
|
|
|
|
{
|
|
|
|
SECTION("post-increment")
|
|
|
|
{
|
|
|
|
SECTION("null")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
it++;
|
2016-12-01 06:16:54 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it != 0 and it.m_it.primitive_iterator.m_it != 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("number")
|
|
|
|
{
|
|
|
|
json j(17);
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 0));
|
2016-08-05 03:55:47 +08:00
|
|
|
it++;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
it++;
|
2016-12-01 06:16:54 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it != 0 and it.m_it.primitive_iterator.m_it != 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("object")
|
|
|
|
{
|
|
|
|
json j({{"foo", "bar"}});
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.object_iterator == it.m_object->m_value.object->begin()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it++;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.object_iterator == it.m_object->m_value.object->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("array")
|
|
|
|
{
|
|
|
|
json j({1, 2, 3, 4});
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator == it.m_object->m_value.array->begin()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it++;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it++;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it++;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it++;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator == it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("pre-increment")
|
|
|
|
{
|
|
|
|
SECTION("null")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
++it;
|
2016-12-01 06:16:54 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it != 0 and it.m_it.primitive_iterator.m_it != 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("number")
|
|
|
|
{
|
|
|
|
json j(17);
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 0));
|
2016-08-05 03:55:47 +08:00
|
|
|
++it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
++it;
|
2016-12-01 06:16:54 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it != 0 and it.m_it.primitive_iterator.m_it != 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("object")
|
|
|
|
{
|
|
|
|
json j({{"foo", "bar"}});
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.object_iterator == it.m_object->m_value.object->begin()));
|
2016-08-05 03:55:47 +08:00
|
|
|
++it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.object_iterator == it.m_object->m_value.object->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("array")
|
|
|
|
{
|
|
|
|
json j({1, 2, 3, 4});
|
|
|
|
json::const_iterator it = j.cbegin();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator == it.m_object->m_value.array->begin()));
|
2016-08-05 03:55:47 +08:00
|
|
|
++it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
++it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
++it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
++it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator == it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("post-decrement")
|
|
|
|
{
|
|
|
|
SECTION("null")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it = j.cend();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("number")
|
|
|
|
{
|
|
|
|
json j(17);
|
|
|
|
json::const_iterator it = j.cend();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
it--;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 0));
|
2016-08-05 03:55:47 +08:00
|
|
|
it--;
|
2016-12-01 06:16:54 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it != 0 and it.m_it.primitive_iterator.m_it != 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("object")
|
|
|
|
{
|
|
|
|
json j({{"foo", "bar"}});
|
|
|
|
json::const_iterator it = j.cend();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.object_iterator == it.m_object->m_value.object->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it--;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.object_iterator == it.m_object->m_value.object->begin()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("array")
|
|
|
|
{
|
|
|
|
json j({1, 2, 3, 4});
|
|
|
|
json::const_iterator it = j.cend();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator == it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it--;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it--;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it--;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
it--;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator == it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("pre-decrement")
|
|
|
|
{
|
|
|
|
SECTION("null")
|
|
|
|
{
|
|
|
|
json j(json::value_t::null);
|
|
|
|
json::const_iterator it = j.cend();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("number")
|
|
|
|
{
|
|
|
|
json j(17);
|
|
|
|
json::const_iterator it = j.cend();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
--it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it == 0));
|
2016-08-05 03:55:47 +08:00
|
|
|
--it;
|
2016-12-01 06:16:54 +08:00
|
|
|
CHECK((it.m_it.primitive_iterator.m_it != 0 and it.m_it.primitive_iterator.m_it != 1));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("object")
|
|
|
|
{
|
|
|
|
json j({{"foo", "bar"}});
|
|
|
|
json::const_iterator it = j.cend();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.object_iterator == it.m_object->m_value.object->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
--it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.object_iterator == it.m_object->m_value.object->begin()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTION("array")
|
|
|
|
{
|
|
|
|
json j({1, 2, 3, 4});
|
|
|
|
json::const_iterator it = j.cend();
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator == it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
--it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
--it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
--it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
--it;
|
2017-01-09 01:17:33 +08:00
|
|
|
CHECK((it.m_it.array_iterator == it.m_object->m_value.array->begin()));
|
|
|
|
CHECK((it.m_it.array_iterator != it.m_object->m_value.array->end()));
|
2016-08-05 03:55:47 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|