OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifdef __cplusplus | 5 #ifdef __cplusplus |
6 #error "This file should be compiled as C, not C++." | 6 #error "This file should be compiled as C, not C++." |
7 #endif | 7 #endif |
8 | 8 |
9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> |
10 #include <string.h> | 11 #include <string.h> |
11 | 12 |
12 // Include all the header files that are meant to be compilable as C. Start with | 13 // Include all the header files that are meant to be compilable as C. Start with |
13 // core.h, since it's the most important one. | 14 // core.h, since it's the most important one. |
14 #include "mojo/public/c/environment/async_waiter.h" | 15 #include "mojo/public/c/environment/async_waiter.h" |
15 #include "mojo/public/c/system/core.h" | 16 #include "mojo/public/c/system/core.h" |
16 #include "mojo/public/c/system/macros.h" | 17 #include "mojo/public/c/system/macros.h" |
17 | 18 |
18 // The joys of the C preprocessor.... | 19 // The joys of the C preprocessor.... |
19 #define STRINGIFY(x) #x | 20 #define STRINGIFY(x) #x |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 EXPECT_EQ((uint32_t)sizeof(kHello), num_bytes); | 95 EXPECT_EQ((uint32_t)sizeof(kHello), num_bytes); |
95 EXPECT_EQ(0, memcmp(buffer, kHello, sizeof(kHello))); | 96 EXPECT_EQ(0, memcmp(buffer, kHello, sizeof(kHello))); |
96 | 97 |
97 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle0)); | 98 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle0)); |
98 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle1)); | 99 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle1)); |
99 | 100 |
100 // TODO(vtl): data pipe | 101 // TODO(vtl): data pipe |
101 | 102 |
102 return NULL; | 103 return NULL; |
103 } | 104 } |
OLD | NEW |