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

Side by Side Diff: mojo/public/c/system/tests/compile_unittest_pure_c.c

Issue 2229573002: Change the canonical way to include the C macros.h to <mojo/macros.h>. (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 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 all the header files that are meant to be compilable as C.
10 #include <mojo/macros.h>
9 #include <stddef.h> 11 #include <stddef.h>
10 #include <string.h> 12 #include <string.h>
11 13
12 // Include all the header files that are meant to be compilable as C. 14 // Include all the header files that are meant to be compilable as C.
13 #include "mojo/public/c/environment/async_waiter.h" 15 #include "mojo/public/c/environment/async_waiter.h"
14 #include "mojo/public/c/environment/logger.h" 16 #include "mojo/public/c/environment/logger.h"
15 #include "mojo/public/c/system/buffer.h" 17 #include "mojo/public/c/system/buffer.h"
16 #include "mojo/public/c/system/data_pipe.h" 18 #include "mojo/public/c/system/data_pipe.h"
17 #include "mojo/public/c/system/handle.h" 19 #include "mojo/public/c/system/handle.h"
18 #include "mojo/public/c/system/macros.h"
19 #include "mojo/public/c/system/main.h" 20 #include "mojo/public/c/system/main.h"
20 #include "mojo/public/c/system/message_pipe.h" 21 #include "mojo/public/c/system/message_pipe.h"
21 #include "mojo/public/c/system/result.h" 22 #include "mojo/public/c/system/result.h"
22 #include "mojo/public/c/system/time.h" 23 #include "mojo/public/c/system/time.h"
23 #include "mojo/public/c/system/wait.h" 24 #include "mojo/public/c/system/wait.h"
24 #include "mojo/public/c/system/wait_set.h" 25 #include "mojo/public/c/system/wait_set.h"
25 26
26 // The joys of the C preprocessor.... 27 // The joys of the C preprocessor....
27 #define STRINGIFY(x) #x 28 #define STRINGIFY(x) #x
28 #define STRINGIFY2(x) STRINGIFY(x) 29 #define STRINGIFY2(x) STRINGIFY(x)
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 EXPECT_EQ((uint32_t)sizeof(kHello), num_bytes); 103 EXPECT_EQ((uint32_t)sizeof(kHello), num_bytes);
103 EXPECT_EQ(0, memcmp(buffer, kHello, sizeof(kHello))); 104 EXPECT_EQ(0, memcmp(buffer, kHello, sizeof(kHello)));
104 105
105 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle0)); 106 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle0));
106 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle1)); 107 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle1));
107 108
108 // TODO(vtl): data pipe 109 // TODO(vtl): data pipe
109 110
110 return NULL; 111 return NULL;
111 } 112 }
OLDNEW
« no previous file with comments | « mojo/public/c/system/tests/BUILD.gn ('k') | mojo/public/c/system/tests/compile_unittest_pure_cpp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698