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

Side by Side Diff: mojo/public/tests/system/macros_unittest.cc

Issue 213393002: Mojo: Move public C system header files to mojo/public/c/system/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 9 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/tests/system/core_unittest_pure_c.c ('k') | mojo/public/utility/lib/thread_local.h » ('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 // This file consists of "positive" tests, i.e., those verifying that things 5 // This file consists of "positive" tests, i.e., those verifying that things
6 // work (without compile errors, or even warnings if warnings are treated as 6 // work (without compile errors, or even warnings if warnings are treated as
7 // errors). 7 // errors).
8 // TODO(vtl): Fix no-compile tests (which are all disabled; crbug.com/105388) 8 // TODO(vtl): Fix no-compile tests (which are all disabled; crbug.com/105388)
9 // and write some "negative" tests. 9 // and write some "negative" tests.
10 10
11 #include "mojo/public/system/macros.h" 11 #include "mojo/public/c/system/macros.h"
12 12
13 #include <assert.h> 13 #include <assert.h>
14 #include <stdint.h> 14 #include <stdint.h>
15 #include <stdlib.h> 15 #include <stdlib.h>
16 16
17 #include "mojo/public/system/macros.h"
18 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
19 18
20 namespace mojo { 19 namespace mojo {
21 namespace { 20 namespace {
22 21
23 TEST(MacrosTest, AllowUnused) { 22 TEST(MacrosTest, AllowUnused) {
24 // Test that no warning/error is issued even though |x| is unused. 23 // Test that no warning/error is issued even though |x| is unused.
25 int x MOJO_ALLOW_UNUSED = 123; 24 int x MOJO_ALLOW_UNUSED = 123;
26 } 25 }
27 26
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 EXPECT_FALSE(y.is_set()); 139 EXPECT_FALSE(y.is_set());
141 EXPECT_TRUE(z.is_set()); 140 EXPECT_TRUE(z.is_set());
142 EXPECT_EQ(123, z.value()); 141 EXPECT_EQ(123, z.value());
143 z = z.Pass(); 142 z = z.Pass();
144 EXPECT_TRUE(z.is_set()); 143 EXPECT_TRUE(z.is_set());
145 EXPECT_EQ(123, z.value()); 144 EXPECT_EQ(123, z.value());
146 } 145 }
147 146
148 } // namespace 147 } // namespace
149 } // namespace mojo 148 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/tests/system/core_unittest_pure_c.c ('k') | mojo/public/utility/lib/thread_local.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698