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

Side by Side Diff: chromeos/test_helpers.h

Issue 6602095: libchromeos: revert add process control library, syslog logging capability, and run unit tests (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/common.git@master
Patch Set: Created 9 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 | « chromeos/syslog_logging.cc ('k') | testrunner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef _CHROMEOS_TEST_HELPERS_H_
6 #define _CHROMEOS_TEST_HELPERS_H_
7
8 #include "gtest/gtest.h"
9
10 #include <string>
11
12 #include <base/command_line.h>
13 #include <base/file_util.h>
14 #include <base/logging.h>
15 #include <chromeos/syslog_logging.h>
16
17 inline void ExpectFileEquals(const char* golden,
18 const char* file_path) {
19 std::string contents;
20 EXPECT_TRUE(file_util::ReadFileToString(FilePath(file_path),
21 &contents));
22 EXPECT_EQ(golden, contents);
23 }
24
25 inline void SetUpTests(int *argc, char** argv, bool log_to_stderr) {
26 CommandLine::Init(*argc, argv);
27 ::chromeos::InitLog(log_to_stderr ? chromeos::kLogToStderr : 0);
28 ::chromeos::LogToString(true);
29 ::testing::InitGoogleTest(argc, argv);
30 }
31
32 #endif // _CHROMEOS_TEST_HELPERS_H_
OLDNEW
« no previous file with comments | « chromeos/syslog_logging.cc ('k') | testrunner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698