OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 API. | 5 // This file tests the C API. |
6 | 6 |
7 #include <string.h> | 7 #include <string.h> |
8 | 8 |
9 #include "mojo/public/c/system/buffer.h" | 9 #include "mojo/public/c/system/buffer.h" |
10 #include "mojo/public/c/system/data_pipe.h" | 10 #include "mojo/public/c/system/data_pipe.h" |
11 #include "mojo/public/c/system/functions.h" | |
12 #include "mojo/public/c/system/handle.h" | 11 #include "mojo/public/c/system/handle.h" |
13 #include "mojo/public/c/system/message_pipe.h" | 12 #include "mojo/public/c/system/message_pipe.h" |
14 #include "mojo/public/c/system/result.h" | 13 #include "mojo/public/c/system/result.h" |
15 #include "mojo/public/c/system/types.h" | 14 #include "mojo/public/c/system/time.h" |
| 15 #include "mojo/public/c/system/wait.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace mojo { | 18 namespace mojo { |
19 namespace { | 19 namespace { |
20 | 20 |
21 const MojoHandleSignals kSignalReadadableWritable = | 21 const MojoHandleSignals kSignalReadadableWritable = |
22 MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE; | 22 MOJO_HANDLE_SIGNAL_READABLE | MOJO_HANDLE_SIGNAL_WRITABLE; |
23 | 23 |
24 const MojoHandleSignals kSignalAll = MOJO_HANDLE_SIGNAL_READABLE | | 24 const MojoHandleSignals kSignalAll = MOJO_HANDLE_SIGNAL_READABLE | |
25 MOJO_HANDLE_SIGNAL_WRITABLE | | 25 MOJO_HANDLE_SIGNAL_WRITABLE | |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 // This checks that things actually work in C (not C++). | 357 // This checks that things actually work in C (not C++). |
358 TEST(CoreTest, MinimalCTest) { | 358 TEST(CoreTest, MinimalCTest) { |
359 const char* failure = MinimalCTest(); | 359 const char* failure = MinimalCTest(); |
360 EXPECT_FALSE(failure) << failure; | 360 EXPECT_FALSE(failure) << failure; |
361 } | 361 } |
362 | 362 |
363 // TODO(vtl): Add multi-threaded tests. | 363 // TODO(vtl): Add multi-threaded tests. |
364 | 364 |
365 } // namespace | 365 } // namespace |
366 } // namespace mojo | 366 } // namespace mojo |
OLD | NEW |