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

Unified Diff: mojo/public/cpp/system/tests/buffer_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/system/tests/BUILD.gn ('k') | mojo/public/cpp/system/tests/data_pipe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/system/tests/buffer_unittest.cc
diff --git a/mojo/public/cpp/system/tests/buffer_unittest.cc b/mojo/public/cpp/system/tests/buffer_unittest.cc
deleted file mode 100644
index 495d268ed27318dc78e75600a1d87af82f817247..0000000000000000000000000000000000000000
--- a/mojo/public/cpp/system/tests/buffer_unittest.cc
+++ /dev/null
@@ -1,40 +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.
-
-// This file tests the C++ wrappers in mojo/public/cpp/system/buffer.h.
-
-#include "mojo/public/cpp/system/buffer.h"
-
-#include "gtest/gtest.h"
-
-namespace mojo {
-namespace {
-
-TEST(BufferTest, BasicSharedBuffer) {
- // Cursory compilation test of |MakeScopedHandle()| with shared buffer
- // handles.
- EXPECT_FALSE(MakeScopedHandle(SharedBufferHandle()).is_valid());
-
- ScopedSharedBufferHandle shared_buffer;
- EXPECT_EQ(MOJO_RESULT_OK, CreateSharedBuffer(nullptr, 100u, &shared_buffer));
- EXPECT_TRUE(shared_buffer.is_valid());
-
- void* pointer = nullptr;
- EXPECT_EQ(MOJO_RESULT_OK, MapBuffer(shared_buffer.get(), 0, 100u, &pointer,
- MOJO_MAP_BUFFER_FLAG_NONE));
- EXPECT_NE(pointer, nullptr);
-
- // Just try writing to it.
- *static_cast<char*>(pointer) = 'x';
-
- shared_buffer.reset();
-
- // Can still write to it even after the handle is closed.
- *static_cast<char*>(pointer) = 'y';
-
- EXPECT_EQ(MOJO_RESULT_OK, UnmapBuffer(pointer));
-}
-
-} // namespace
-} // namespace mojo
« no previous file with comments | « mojo/public/cpp/system/tests/BUILD.gn ('k') | mojo/public/cpp/system/tests/data_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698