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

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

Issue 2604113002: Remove mojo::WTFArray. (Closed)
Patch Set: rebase Created 3 years, 11 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/BUILD.gn ('k') | mojo/public/cpp/bindings/tests/wtf_types_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/wtf_array_unittest.cc
diff --git a/mojo/public/cpp/bindings/tests/wtf_array_unittest.cc b/mojo/public/cpp/bindings/tests/wtf_array_unittest.cc
deleted file mode 100644
index bb54b9c9a4fbb0224af7772ddf331919364d023d..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/bindings/tests/wtf_array_unittest.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2016 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 "mojo/public/cpp/bindings/wtf_array.h"
-
-#include "mojo/public/cpp/bindings/lib/serialization.h"
-#include "mojo/public/cpp/bindings/lib/wtf_serialization.h"
-#include "mojo/public/cpp/bindings/tests/array_common_test.h"
-#include "mojo/public/cpp/bindings/tests/container_test_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace mojo {
-namespace test {
-namespace {
-
-using WTFArrayTest = testing::Test;
-
-ARRAY_COMMON_TEST(WTFArray, NullAndEmpty)
-ARRAY_COMMON_TEST(WTFArray, Basic)
-ARRAY_COMMON_TEST(WTFArray, Bool)
-ARRAY_COMMON_TEST(WTFArray, Handle)
-ARRAY_COMMON_TEST(WTFArray, HandlesAreClosed)
-ARRAY_COMMON_TEST(WTFArray, Clone)
-ARRAY_COMMON_TEST(WTFArray, Serialization_ArrayOfPOD)
-ARRAY_COMMON_TEST(WTFArray, Serialization_EmptyArrayOfPOD)
-ARRAY_COMMON_TEST(WTFArray, Serialization_ArrayOfArrayOfPOD)
-ARRAY_COMMON_TEST(WTFArray, Serialization_ArrayOfBool)
-ARRAY_COMMON_TEST(WTFArray, Serialization_ArrayOfString)
-ARRAY_COMMON_TEST(WTFArray, Resize_Copyable)
-ARRAY_COMMON_TEST(WTFArray, Resize_MoveOnly)
-
-TEST_F(WTFArrayTest, MoveFromAndToWTFVector_Copyable) {
- WTF::Vector<CopyableType> vec1(1);
- WTFArray<CopyableType> arr(std::move(vec1));
- ASSERT_EQ(1u, arr.size());
- ASSERT_FALSE(arr[0].copied());
-
- WTF::Vector<CopyableType> vec2(arr.PassStorage());
- ASSERT_EQ(1u, vec2.size());
- ASSERT_FALSE(vec2[0].copied());
-
- ASSERT_EQ(0u, arr.size());
- ASSERT_TRUE(arr.is_null());
-}
-
-TEST_F(WTFArrayTest, MoveFromAndToWTFVector_MoveOnly) {
- WTF::Vector<MoveOnlyType> vec1(1);
- WTFArray<MoveOnlyType> arr(std::move(vec1));
-
- ASSERT_EQ(1u, arr.size());
-
- WTF::Vector<MoveOnlyType> vec2(arr.PassStorage());
- ASSERT_EQ(1u, vec2.size());
-
- ASSERT_EQ(0u, arr.size());
- ASSERT_TRUE(arr.is_null());
-}
-
-} // namespace
-} // namespace test
-} // namespace mojo
« no previous file with comments | « mojo/public/cpp/bindings/tests/BUILD.gn ('k') | mojo/public/cpp/bindings/tests/wtf_types_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698