Update from https://crrev.com/327068
This rolls in //base, //build and //sandbox/linux and updates other
things to match, in particular:
*) Update build_v8.patch
*) Add junit, mockito and roboelectric to DEPS for android test rules
*) Update DEPS for grit
*) Fix up various GN files for os->target_os rename
*) Fix up a few places that were using //base/float_util to use std::isnan
*) Fix up a few places using ApiCompatibilityUtil to use Android SDK directly
as well as a few miscellaneous fixes.
Many portions based on ncbray's work in
https://codereview.chromium.org/1108173002/
R=ncbray@chromium.org
TBR=ncbray@chromium.org
Review URL: https://codereview.chromium.org/1124763003
diff --git a/base/move_unittest.cc b/base/move_unittest.cc
new file mode 100644
index 0000000..1f4ce84
--- /dev/null
+++ b/base/move_unittest.cc
@@ -0,0 +1,49 @@
+// 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_ = other.value_.Pass(); }
+
+ 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