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

Unified Diff: base/move_unittest.cc

Issue 1479703002: base: Remove move_unittest.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move-only-2: remove-it Created 5 years, 1 month 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 | « base/base.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/move_unittest.cc
diff --git a/base/move_unittest.cc b/base/move_unittest.cc
deleted file mode 100644
index da0be638c5ba26734ac0de3e39fc516afee57bba..0000000000000000000000000000000000000000
--- a/base/move_unittest.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright (c) 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 "base/move.h"
-
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace {
-
-class MoveOnly {
- MOVE_ONLY_TYPE_WITH_MOVE_CONSTRUCTOR_FOR_CPP_03(MoveOnly)
-
- public:
- MoveOnly() {}
-
- MoveOnly(MoveOnly&& other) {}
- MoveOnly& operator=(MoveOnly&& other) { return *this; }
-};
-
-class Container {
- public:
- Container() = default;
- Container(const Container& other) = default;
- Container& operator=(const Container& other) = default;
-
- Container(Container&& other) { value_ = std::move(other.value_); }
-
- Container& operator=(Container&& other) {
- value_ = other.value_.Pass();
- return *this;
- }
-
- private:
- MoveOnly value_;
-};
-
-Container GetContainerRvalue() {
- Container x;
- return x;
-}
-
-TEST(MoveTest, CopyableContainerCanBeMoved) {
- // Container should be move-constructible and move-assignable.
- Container y = GetContainerRvalue();
- y = GetContainerRvalue();
-}
-
-} // namespace
« no previous file with comments | « base/base.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698