diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-01 16:01:15 -0800 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-02-10 15:40:20 -0800 |
commit | f3d4107d19eef20cc2cf30cd347301128b4f9a86 (patch) | |
tree | dc66d61846b2a7fb036c87f127d1dd18045a9293 /test/style | |
parent | 7d6c6c00cac53a3864f0dfd399e64fd862d017e1 (diff) | |
download | qtlocation-mapboxgl-f3d4107d19eef20cc2cf30cd347301128b4f9a86.tar.gz |
[core] Add a method for statically evaluating font stacks used by a style
Diffstat (limited to 'test/style')
-rw-r--r-- | test/style/style_parser.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/style/style_parser.cpp b/test/style/style_parser.cpp index 22b5acb12b..1554c76a27 100644 --- a/test/style/style_parser.cpp +++ b/test/style/style_parser.cpp @@ -113,3 +113,13 @@ TEST(StyleParser, ParseTileJSONVector) { EXPECT_EQ("attribution", result->attribution); EXPECT_EQ("http://a.tiles.mapbox.com/mapbox.streets/{z}-{x}-{y}.vector.pbf?access_token=key", result->tiles[0]); } + +TEST(StyleParser, FontStacks) { + StyleParser parser; + parser.parse(util::read_file("test/fixtures/style_parser/font_stacks.json")); + auto result = parser.fontStacks(); + ASSERT_EQ(3, result.size()); + ASSERT_EQ("a", result[0]); + ASSERT_EQ("a,b", result[1]); + ASSERT_EQ("a,b,c", result[2]); +} |