diff options
author | Ansis Brammanis <brammanis@gmail.com> | 2016-04-05 16:27:37 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-29 12:00:24 -0700 |
commit | 61d14089e0dd742719328fd74c693bcae6274a4b (patch) | |
tree | e47265a472fe75c635a22815ddc4a0c3fa1dbf84 /test/util | |
parent | 25442a77be75001665771097d8978b1191e403d9 (diff) | |
download | qtlocation-mapboxgl-61d14089e0dd742719328fd74c693bcae6274a4b.tar.gz |
[core] implement queryRenderedFeatures
Diffstat (limited to 'test/util')
-rw-r--r-- | test/util/merge_lines.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/test/util/merge_lines.cpp b/test/util/merge_lines.cpp index 6e7273d48c..4b6bad15f6 100644 --- a/test/util/merge_lines.cpp +++ b/test/util/merge_lines.cpp @@ -8,21 +8,21 @@ const std::u32string bbb = U"b"; TEST(MergeLines, SameText) { // merges lines with the same text std::vector<mbgl::SymbolFeature> input1 = { - { {{{0, 0}, {1, 0}, {2, 0}}}, aaa, "" }, - { {{{4, 0}, {5, 0}, {6, 0}}}, bbb, "" }, - { {{{8, 0}, {9, 0}}}, aaa, "" }, - { {{{2, 0}, {3, 0}, {4, 0}}}, aaa, "" }, - { {{{6, 0}, {7, 0}, {8, 0}}}, aaa, "" }, - { {{{5, 0}, {6, 0}}}, aaa, "" } + { {{{0, 0}, {1, 0}, {2, 0}}}, aaa, "", 0 }, + { {{{4, 0}, {5, 0}, {6, 0}}}, bbb, "", 0 }, + { {{{8, 0}, {9, 0}}}, aaa, "", 0 }, + { {{{2, 0}, {3, 0}, {4, 0}}}, aaa, "", 0 }, + { {{{6, 0}, {7, 0}, {8, 0}}}, aaa, "", 0 }, + { {{{5, 0}, {6, 0}}}, aaa, "", 0 } }; const std::vector<mbgl::SymbolFeature> expected1 = { - { {{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}}}, aaa, "" }, - { {{{4, 0}, {5, 0}, {6, 0}}}, bbb, "" }, - { {{{5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}}}, aaa, "" }, - { {{}}, aaa, "" }, - { {{}}, aaa, "" }, - { {{}}, aaa, "" } + { {{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}}}, aaa, "", 0 }, + { {{{4, 0}, {5, 0}, {6, 0}}}, bbb, "", 0 }, + { {{{5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}}}, aaa, "", 0 }, + { {{}}, aaa, "", 0 }, + { {{}}, aaa, "", 0 }, + { {{}}, aaa, "", 0 } }; mbgl::util::mergeLines(input1); @@ -35,15 +35,15 @@ TEST(MergeLines, SameText) { TEST(MergeLines, BothEnds) { // mergeLines handles merge from both ends std::vector<mbgl::SymbolFeature> input2 = { - { {{{0, 0}, {1, 0}, {2, 0}}}, aaa, "" }, - { {{{4, 0}, {5, 0}, {6, 0}}}, aaa, "" }, - { {{{2, 0}, {3, 0}, {4, 0}}}, aaa, "" } + { {{{0, 0}, {1, 0}, {2, 0}}}, aaa, "", 0 }, + { {{{4, 0}, {5, 0}, {6, 0}}}, aaa, "", 0 }, + { {{{2, 0}, {3, 0}, {4, 0}}}, aaa, "", 0 } }; const std::vector<mbgl::SymbolFeature> expected2 = { - { {{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}}}, aaa, "" }, - { {{}}, aaa, "" }, - { {{}}, aaa, "" } + { {{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}}}, aaa, "", 0 }, + { {{}}, aaa, "", 0 }, + { {{}}, aaa, "", 0 } }; mbgl::util::mergeLines(input2); @@ -56,15 +56,15 @@ TEST(MergeLines, BothEnds) { TEST(MergeLines, CircularLines) { // mergeLines handles circular lines std::vector<mbgl::SymbolFeature> input3 = { - { {{{0, 0}, {1, 0}, {2, 0}}}, aaa, "" }, - { {{{2, 0}, {3, 0}, {4, 0}}}, aaa, "" }, - { {{{4, 0}, {0, 0}}}, aaa, "" } + { {{{0, 0}, {1, 0}, {2, 0}}}, aaa, "", 0 }, + { {{{2, 0}, {3, 0}, {4, 0}}}, aaa, "", 0 }, + { {{{4, 0}, {0, 0}}}, aaa, "", 0 } }; const std::vector<mbgl::SymbolFeature> expected3 = { - { {{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {0, 0}}}, aaa, "" }, - { {{}}, aaa, "" }, - { {{}}, aaa, "" } + { {{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {0, 0}}}, aaa, "", 0 }, + { {{}}, aaa, "", 0 }, + { {{}}, aaa, "", 0 } }; mbgl::util::mergeLines(input3); |