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

Side by Side Diff: mojo/public/c/tests/system/wait_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
« no previous file with comments | « mojo/public/c/tests/system/wait_set_unittest.cc ('k') | mojo/public/cpp/application/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 wait API (the functions declared in 5 // This file tests the C wait API (the functions declared in
6 // mojo/public/c/include/mojo/system/wait.h). 6 // mojo/public/c/include/mojo/system/wait.h).
7 7
8 #include <mojo/system/wait.h> 8 #include <mojo/system/wait.h>
9 9
10 #include <mojo/result.h> 10 #include <mojo/result.h>
11 #include <mojo/system/handle.h> 11 #include <mojo/system/handle.h>
12 12
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "gtest/gtest.h"
14 14
15 namespace { 15 namespace {
16 16
17 TEST(WaitTest, InvalidHandle) { 17 TEST(WaitTest, InvalidHandle) {
18 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, 18 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT,
19 MojoWait(MOJO_HANDLE_INVALID, ~MOJO_HANDLE_SIGNAL_NONE, 1000000u, 19 MojoWait(MOJO_HANDLE_INVALID, ~MOJO_HANDLE_SIGNAL_NONE, 1000000u,
20 nullptr)); 20 nullptr));
21 21
22 const MojoHandle h = MOJO_HANDLE_INVALID; 22 const MojoHandle h = MOJO_HANDLE_INVALID;
23 MojoHandleSignals sig = ~MOJO_HANDLE_SIGNAL_NONE; 23 MojoHandleSignals sig = ~MOJO_HANDLE_SIGNAL_NONE;
(...skipping 13 matching lines...) Expand all
37 uint32_t result_index = static_cast<uint32_t>(-1); 37 uint32_t result_index = static_cast<uint32_t>(-1);
38 EXPECT_EQ(MOJO_RESULT_DEADLINE_EXCEEDED, 38 EXPECT_EQ(MOJO_RESULT_DEADLINE_EXCEEDED,
39 MojoWaitMany(nullptr, nullptr, 0u, static_cast<MojoDeadline>(1000), 39 MojoWaitMany(nullptr, nullptr, 0u, static_cast<MojoDeadline>(1000),
40 &result_index, nullptr)); 40 &result_index, nullptr));
41 EXPECT_EQ(static_cast<uint32_t>(-1), result_index); 41 EXPECT_EQ(static_cast<uint32_t>(-1), result_index);
42 } 42 }
43 43
44 // TODO(vtl): Write tests that actually test waiting. 44 // TODO(vtl): Write tests that actually test waiting.
45 45
46 } // namespace 46 } // namespace
OLDNEW
« no previous file with comments | « mojo/public/c/tests/system/wait_set_unittest.cc ('k') | mojo/public/cpp/application/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698