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

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

Issue 244883005: Mojo: Update/add README.md files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « mojo/public/c/system/async_waiter.h ('k') | mojo/public/cpp/README.md » ('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 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 <string.h> 10 #include <string.h>
11 11
12 // Include all the header files that are meant to be compilable as C. Start with 12 // 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. 13 // core.h, since it's the most important one.
14 #include "mojo/public/c/environment/async_waiter.h"
14 #include "mojo/public/c/system/core.h" 15 #include "mojo/public/c/system/core.h"
15 #include "mojo/public/c/system/async_waiter.h"
16 #include "mojo/public/c/system/macros.h" 16 #include "mojo/public/c/system/macros.h"
17 17
18 // The joys of the C preprocessor.... 18 // The joys of the C preprocessor....
19 #define STRINGIFY(x) #x 19 #define STRINGIFY(x) #x
20 #define STRINGIFY2(x) STRINGIFY(x) 20 #define STRINGIFY2(x) STRINGIFY(x)
21 #define FAILURE(message) \ 21 #define FAILURE(message) \
22 __FILE__ "(" STRINGIFY2(__LINE__) "): Failure: " message 22 __FILE__ "(" STRINGIFY2(__LINE__) "): Failure: " message
23 23
24 // Poor man's gtest. 24 // Poor man's gtest.
25 #define EXPECT_EQ(a, b) \ 25 #define EXPECT_EQ(a, b) \
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 EXPECT_EQ((uint32_t) sizeof(kHello), num_bytes); 79 EXPECT_EQ((uint32_t) sizeof(kHello), num_bytes);
80 EXPECT_EQ(0, memcmp(buffer, kHello, sizeof(kHello))); 80 EXPECT_EQ(0, memcmp(buffer, kHello, sizeof(kHello)));
81 81
82 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle0)); 82 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle0));
83 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle1)); 83 EXPECT_EQ(MOJO_RESULT_OK, MojoClose(handle1));
84 84
85 // TODO(vtl): data pipe 85 // TODO(vtl): data pipe
86 86
87 return NULL; 87 return NULL;
88 } 88 }
OLDNEW
« no previous file with comments | « mojo/public/c/system/async_waiter.h ('k') | mojo/public/cpp/README.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698