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

Side by Side Diff: mojo/public/cpp/system/tests/data_pipe_unittest.cc

Issue 2244503002: mojo/public: Include gtest.h as "gtest/gtest.h", instead of via "absolute" path. (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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file tests the C++ wrappers in mojo/public/cpp/system/data_pipe.h. 5 // This file tests the C++ wrappers in mojo/public/cpp/system/data_pipe.h.
6 6
7 #include "mojo/public/cpp/system/data_pipe.h" 7 #include "mojo/public/cpp/system/data_pipe.h"
8 8
9 #include "gtest/gtest.h"
9 #include "mojo/public/cpp/system/handle.h" 10 #include "mojo/public/cpp/system/handle.h"
10 #include "mojo/public/cpp/system/macros.h" 11 #include "mojo/public/cpp/system/macros.h"
11 #include "mojo/public/cpp/system/wait.h" 12 #include "mojo/public/cpp/system/wait.h"
12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 namespace { 15 namespace {
16 16
17 TEST(DataPipe, Basic) { 17 TEST(DataPipe, Basic) {
18 // Cursory compilation tests of |MakeScopedHandle()| with data pipe handles. 18 // Cursory compilation tests of |MakeScopedHandle()| with data pipe handles.
19 EXPECT_FALSE(MakeScopedHandle(DataPipeProducerHandle()).is_valid()); 19 EXPECT_FALSE(MakeScopedHandle(DataPipeProducerHandle()).is_valid());
20 EXPECT_FALSE(MakeScopedHandle(DataPipeConsumerHandle()).is_valid()); 20 EXPECT_FALSE(MakeScopedHandle(DataPipeConsumerHandle()).is_valid());
21 21
22 ScopedDataPipeProducerHandle ph; 22 ScopedDataPipeProducerHandle ph;
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // Close the producer. 112 // Close the producer.
113 ph.reset(); 113 ph.reset();
114 114
115 // Waiting for "read" should now fail. 115 // Waiting for "read" should now fail.
116 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION, 116 EXPECT_EQ(MOJO_RESULT_FAILED_PRECONDITION,
117 Wait(ch.get(), MOJO_HANDLE_SIGNAL_READ_THRESHOLD, 1000, nullptr)); 117 Wait(ch.get(), MOJO_HANDLE_SIGNAL_READ_THRESHOLD, 1000, nullptr));
118 } 118 }
119 119
120 } // namespace mojo 120 } // namespace mojo
121 } // namespace 121 } // namespace
OLDNEW
« no previous file with comments | « mojo/public/cpp/system/tests/buffer_unittest.cc ('k') | mojo/public/cpp/system/tests/handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698