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

Side by Side Diff: mojo/public/c/tests/compile/compile_unittest.cc

Issue 2244503002: mojo/public: Include gtest.h as "gtest/gtest.h", instead of via "absolute" path. (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 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 just "forwards" to "pure" tests -- those that are written using 5 // This file just "forwards" to "pure" tests -- those that are written using
6 // only headers from mojo/public/c/include/mojo, 6 // only headers from mojo/public/c/include/mojo,
7 // mojo/public/c/include/mojo/environment, mojo/public/c/include/mojo/system 7 // mojo/public/c/include/mojo/environment, mojo/public/c/include/mojo/system
8 // (and the C standard library), and not using gtest. 8 // (and the C standard library), and not using gtest.
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "gtest/gtest.h"
11 11
12 // Defined in compile_unittest_pure_c.c. 12 // Defined in compile_unittest_pure_c.c.
13 extern "C" const char* MinimalCTest(void); 13 extern "C" const char* MinimalCTest(void);
14 14
15 // Defined in compile_unittest_pure_cpp.cc. 15 // Defined in compile_unittest_pure_cpp.cc.
16 const char* MinimalCppTest(); 16 const char* MinimalCppTest();
17 17
18 namespace { 18 namespace {
19 19
20 // This checks that things actually work in C (not C++). 20 // This checks that things actually work in C (not C++).
21 TEST(CompileTest, MinimalCTest) { 21 TEST(CompileTest, MinimalCTest) {
22 const char* failure = MinimalCTest(); 22 const char* failure = MinimalCTest();
23 EXPECT_FALSE(failure) << failure; 23 EXPECT_FALSE(failure) << failure;
24 } 24 }
25 25
26 // This checks that things compile in C++ as well, without gtest. 26 // This checks that things compile in C++ as well, without gtest.
27 TEST(CompileTest, MinimalCppTest) { 27 TEST(CompileTest, MinimalCppTest) {
28 const char* failure = MinimalCppTest(); 28 const char* failure = MinimalCppTest();
29 EXPECT_FALSE(failure) << failure; 29 EXPECT_FALSE(failure) << failure;
30 } 30 }
31 31
32 } // namespace 32 } // namespace
OLDNEW
« no previous file with comments | « mojo/public/c/tests/bindings/validation_unittest.cc ('k') | mojo/public/c/tests/macros_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698