diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-27 23:28:04 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-01-28 17:37:23 -0800 |
commit | d90d374203415b5d7336d8902ad4f1fb0f9ec923 (patch) | |
tree | 28d561d4330da1c9a7668d399e63351eda01fa5b /test | |
parent | b738087080b924061c4e6ce4c8b60ae4573f4f10 (diff) | |
download | qtlocation-mapboxgl-d90d374203415b5d7336d8902ad4f1fb0f9ec923.tar.gz |
[core] Move rapidjson document creation into StyleParser
Diffstat (limited to 'test')
-rw-r--r-- | test/miscellaneous/style_parser.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/miscellaneous/style_parser.cpp b/test/miscellaneous/style_parser.cpp index ab5e984752..46d0dab5d8 100644 --- a/test/miscellaneous/style_parser.cpp +++ b/test/miscellaneous/style_parser.cpp @@ -27,16 +27,11 @@ TEST_P(StyleParserTest, ParseStyle) { ASSERT_FALSE(infoDoc.HasParseError()); ASSERT_TRUE(infoDoc.IsObject()); - rapidjson::GenericDocument<rapidjson::UTF8<>, rapidjson::CrtAllocator> styleDoc; - styleDoc.Parse<0>(util::read_file(base + ".style.json").c_str()); - ASSERT_FALSE(styleDoc.HasParseError()); - ASSERT_TRUE(styleDoc.IsObject()); - FixtureLogObserver* observer = new FixtureLogObserver(); Log::setObserver(std::unique_ptr<Log::Observer>(observer)); StyleParser parser; - parser.parse(styleDoc); + parser.parse(util::read_file(base + ".style.json")); for (auto it = infoDoc.MemberBegin(), end = infoDoc.MemberEnd(); it != end; it++) { const std::string name { it->name.GetString(), it->name.GetStringLength() }; |