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

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

Issue 2106433002: Add thunks for wait set operations, together with public tests. (Closed) Base URL: https://github.com/domokit/mojo.git@work791_wait_set_6-x-work790_wait_set_5.4
Patch Set: doh Created 4 years, 5 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 data pipe API (the functions declared in 5 // This file tests the C data pipe API (the functions declared in
6 // mojo/public/c/system/data_pipe.h). 6 // mojo/public/c/system/data_pipe.h).
7 7
8 #include "mojo/public/c/system/data_pipe.h"
9
8 #include <string.h> 10 #include <string.h>
9 11
10 #include "mojo/public/c/system/data_pipe.h"
11 #include "mojo/public/c/system/handle.h" 12 #include "mojo/public/c/system/handle.h"
12 #include "mojo/public/c/system/result.h" 13 #include "mojo/public/c/system/result.h"
13 #include "mojo/public/c/system/wait.h" 14 #include "mojo/public/c/system/wait.h"
14 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
15 16
16 namespace { 17 namespace {
17 18
18 const MojoHandleRights kDefaultDataPipeProducerHandleRights = 19 const MojoHandleRights kDefaultDataPipeProducerHandleRights =
19 MOJO_HANDLE_RIGHT_TRANSFER | MOJO_HANDLE_RIGHT_WRITE | 20 MOJO_HANDLE_RIGHT_TRANSFER | MOJO_HANDLE_RIGHT_WRITE |
20 MOJO_HANDLE_RIGHT_GET_OPTIONS | MOJO_HANDLE_RIGHT_SET_OPTIONS; 21 MOJO_HANDLE_RIGHT_GET_OPTIONS | MOJO_HANDLE_RIGHT_SET_OPTIONS;
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 EXPECT_EQ(MOJO_RESULT_OK, 437 EXPECT_EQ(MOJO_RESULT_OK,
437 MojoWait(hc, MOJO_HANDLE_SIGNAL_READ_THRESHOLD, 0, nullptr)); 438 MojoWait(hc, MOJO_HANDLE_SIGNAL_READ_THRESHOLD, 0, nullptr));
438 439
439 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(hp)); 440 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(hp));
440 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(hc)); 441 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(hc));
441 } 442 }
442 443
443 // TODO(vtl): Add multi-threaded tests. 444 // TODO(vtl): Add multi-threaded tests.
444 445
445 } // namespace 446 } // namespace
OLDNEW
« no previous file with comments | « mojo/public/c/system/tests/buffer_unittest.cc ('k') | mojo/public/c/system/tests/handle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698