| Index: mojo/public/cpp/system/tests/core_unittest.cc
|
| diff --git a/mojo/public/cpp/system/tests/core_unittest.cc b/mojo/public/cpp/system/tests/core_unittest.cc
|
| index ee955f1b38fc1367b92706453425791e84914315..b3ebea2d202a1f1f4ffde43b8c370997e8b76168 100644
|
| --- a/mojo/public/cpp/system/tests/core_unittest.cc
|
| +++ b/mojo/public/cpp/system/tests/core_unittest.cc
|
| @@ -10,8 +10,8 @@
|
|
|
| #include <stddef.h>
|
| #include <stdint.h>
|
| -
|
| #include <map>
|
| +#include <utility>
|
|
|
| #include "mojo/public/cpp/system/macros.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -103,7 +103,7 @@ TEST(CoreCppTest, Basic) {
|
| EXPECT_EQ(kInvalidHandleValue, h.get().value());
|
|
|
| // This should be a no-op.
|
| - Close(h.Pass());
|
| + Close(std::move(h));
|
|
|
| // It should still be invalid.
|
| EXPECT_EQ(kInvalidHandleValue, h.get().value());
|
| @@ -213,7 +213,7 @@ TEST(CoreCppTest, Basic) {
|
| EXPECT_EQ(kSignalAll, states[1].satisfiable_signals);
|
|
|
| // Test closing |h1| explicitly.
|
| - Close(h1.Pass());
|
| + Close(std::move(h1));
|
| EXPECT_FALSE(h1.get().is_valid());
|
|
|
| // Make sure |h1| is closed.
|
| @@ -474,22 +474,12 @@ TEST(CoreCppTest, ScopedHandleMoveCtor) {
|
|
|
| // If this fails to close buffer1, ScopedHandleBase::CloseIfNecessary() will
|
| // assert.
|
| - buffer1 = buffer2.Pass();
|
| + buffer1 = std::move(buffer2);
|
|
|
| EXPECT_TRUE(buffer1.is_valid());
|
| EXPECT_FALSE(buffer2.is_valid());
|
| }
|
|
|
| -TEST(CoreCppTest, ScopedHandleMoveCtorSelf) {
|
| - ScopedSharedBufferHandle buffer1;
|
| - EXPECT_EQ(MOJO_RESULT_OK, CreateSharedBuffer(nullptr, 1024, &buffer1));
|
| - EXPECT_TRUE(buffer1.is_valid());
|
| -
|
| - buffer1 = buffer1.Pass();
|
| -
|
| - EXPECT_TRUE(buffer1.is_valid());
|
| -}
|
| -
|
| // TODO(vtl): Write data pipe tests.
|
|
|
| } // namespace
|
|
|