diff options
author | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-07-28 09:57:24 +0200 |
---|---|---|
committer | Marcus Fritzsch <marcus_fritzsch@mentor.com> | 2017-08-08 17:24:00 +0200 |
commit | f1dcabc5b8e2d9b31cbb031ce2f8d8054e41a48a (patch) | |
tree | 076e36046a57b3063c36336da8e4cd774cc962dc /src/app.cpp | |
parent | 397ad714d8a0ddc3f0b9d5cbcbd68aec9cbe55d0 (diff) |
app/layers: move embedded test run to layers
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'src/app.cpp')
-rw-r--r-- | src/app.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/app.cpp b/src/app.cpp index 871222f..29f84f7 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -79,28 +79,7 @@ struct result<surface_id_to_layer_map> std::ifstream i(filename); i >> jids; - auto m = to_surface_id_to_layer_map(jids["mappings"]); - - if (m.is_ok()) { - auto i = m.unwrap(); - - auto jtests = jids.value("tests", json()); - - std::vector<std::pair<int, int>> tests; - std::transform(std::cbegin(jtests), std::cend(jtests), - std::back_inserter(tests), [](json const &j) { - return std::make_pair(get<int>(j["surface_id"]), - get<int>(j["expect_layer_id"])); - }); - - for (auto sid : tests) { - if (i.get_layer_for_surface(sid.first).value_or(-1) != sid.second) { - return Err<surface_id_to_layer_map>("ID Map embedded test failed!"); - } - } - } - - return m; + return to_surface_id_to_layer_map(jids); } } // namespace |