summaryrefslogtreecommitdiff
path: root/test/style
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-08-26 13:46:54 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-09-15 14:05:23 +0200
commitd1d523686c01aacee1f1f9b6f6c7f22a6ff54d14 (patch)
tree45e6209ce30bf0e78d8b8690ead61e93befeb0a3 /test/style
parentd6c958ba5fab8318be09d0c60a2eccd9ccbd7186 (diff)
downloadqtlocation-mapboxgl-d1d523686c01aacee1f1f9b6f6c7f22a6ff54d14.tar.gz
[core] upgrade RapidJSON to 1.1.0
Diffstat (limited to 'test/style')
-rw-r--r--test/style/style_parser.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/style/style_parser.cpp b/test/style/style_parser.cpp
index 3e1149c997..e3c1da582f 100644
--- a/test/style/style_parser.cpp
+++ b/test/style/style_parser.cpp
@@ -39,17 +39,18 @@ TEST_P(StyleParserTest, ParseStyle) {
Log::Error(Event::ParseStyle, "Failed to parse style: %s", util::toString(error).c_str());
}
- for (auto it = infoDoc.MemberBegin(), end = infoDoc.MemberEnd(); it != end; it++) {
- const std::string name { it->name.GetString(), it->name.GetStringLength() };
- const JSValue &value = it->value;
+ ASSERT_TRUE(infoDoc.IsObject());
+ for (const auto& property : infoDoc.GetObject()) {
+ const std::string name { property.name.GetString(), property.name.GetStringLength() };
+ const JSValue &value = property.value;
ASSERT_EQ(true, value.IsObject());
if (value.HasMember("log")) {
const JSValue &js_log = value["log"];
ASSERT_EQ(true, js_log.IsArray());
- for (rapidjson::SizeType i = 0; i < js_log.Size(); i++) {
- const JSValue &js_entry = js_log[i];
+ for (auto& js_entry : js_log.GetArray()) {
ASSERT_EQ(true, js_entry.IsArray());
+ ASSERT_GE(4u, js_entry.Size());
const uint32_t count = js_entry[rapidjson::SizeType(0)].GetUint();
const FixtureLogObserver::LogMessage message {