Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: mojo/public/cpp/bindings/tests/iterator_util_unittest.cc

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/cpp/bindings/tests/iterator_test_util.h ('k') | mojo/public/cpp/bindings/tests/map_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/tests/iterator_util_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/iterator_util_unittest.cc b/mojo/public/cpp/bindings/tests/iterator_util_unittest.cc
deleted file mode 100644
index e8b1fe859d745e8db817cd46c11ee1be81af701f..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/bindings/tests/iterator_util_unittest.cc
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <algorithm>
-
-#include "gtest/gtest.h"
-#include "mojo/public/cpp/bindings/lib/iterator_util.h"
-#include "mojo/public/cpp/bindings/map.h"
-#include "mojo/public/cpp/bindings/tests/iterator_test_util.h"
-
-namespace mojo {
-namespace test {
-
-using internal::MapKeyIterator;
-using internal::MapValueIterator;
-
-TEST(MapIteratorTest, KeyIterator) {
- Map<int, int> my_map;
- my_map[1] = 2;
- my_map[3] = 4;
- my_map[5] = 6;
-
- MapKeyIterator<int, int> key_iter(&my_map);
- std::vector<int> expected_vals;
- expected_vals.push_back(1);
- expected_vals.push_back(3);
- expected_vals.push_back(5);
- ExpectIteratorValues(key_iter.begin(), key_iter.end(), expected_vals);
-}
-
-TEST(MapIteratorTest, ValueIterator) {
- Map<int, int> my_map;
- my_map[1] = 2;
- my_map[3] = 4;
- my_map[5] = 6;
-
- MapValueIterator<int, int> value_iter(&my_map);
- std::vector<int> expected_vals;
- expected_vals.push_back(2);
- expected_vals.push_back(4);
- expected_vals.push_back(6);
- ExpectIteratorValues(value_iter.begin(), value_iter.end(), expected_vals);
-}
-
-TEST(MapIteratorTest, BidirectionalIteratorConcept) {
- Map<int, int> my_map;
- my_map[1] = 2;
- my_map[3] = 4;
- my_map[5] = 6;
-
- // Test common IteratorView specializations for Map keys, Map values, and
- // Arrays.
- MapKeyIterator<int, int> map_key_iter(&my_map);
- MapValueIterator<int, int> map_value_iter(&my_map);
-
- {
- SCOPED_TRACE("Test map key iterator bidirectionality.");
- std::vector<int> expected_vals;
- expected_vals.push_back(1);
- expected_vals.push_back(3);
- expected_vals.push_back(5);
- ExpectBidiIteratorConcept(map_key_iter.begin(), map_key_iter.end(),
- expected_vals);
- }
-
- {
- SCOPED_TRACE("Test map value iterator bidirectionality.");
- std::vector<int> expected_vals;
- expected_vals.push_back(2);
- expected_vals.push_back(4);
- expected_vals.push_back(6);
- ExpectBidiIteratorConcept(map_value_iter.begin(), map_value_iter.end(),
- expected_vals);
- }
-
- {
- SCOPED_TRACE("Test map value iterator mutability.");
- std::vector<int> expected_vals;
- expected_vals.push_back(2);
- expected_vals.push_back(4);
- expected_vals.push_back(6);
- ExpectBidiMutableIteratorConcept(map_value_iter.begin(),
- map_value_iter.end(), expected_vals);
- }
-}
-
-} // namespace test
-} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/tests/iterator_test_util.h ('k') | mojo/public/cpp/bindings/tests/map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698