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

Side by Side Diff: sandbox/linux/tests/unit_tests.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 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 | « remoting/protocol/transport.cc ('k') | sql/statement.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <fcntl.h> 5 #include <fcntl.h>
6 #include <poll.h> 6 #include <poll.h>
7 #include <signal.h> 7 #include <signal.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <sys/resource.h> 9 #include <sys/resource.h>
10 #include <sys/time.h> 10 #include <sys/time.h>
11 #include <unistd.h> 11 #include <unistd.h>
12 12
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/third_party/valgrind/valgrind.h" 14 #include "base/third_party/valgrind/valgrind.h"
15 #include "sandbox/linux/tests/unit_tests.h" 15 #include "sandbox/linux/tests/unit_tests.h"
16 16
17 namespace { 17 namespace {
18 std::string TestFailedMessage(const std::string& msg) { 18 std::string TestFailedMessage(const std::string& msg) {
19 return msg.empty() ? "" : "Actual test failure: " + msg; 19 return msg.empty() ? std::string() : "Actual test failure: " + msg;
20 } 20 }
21 21
22 int GetSubProcessTimeoutTimeInSeconds() { 22 int GetSubProcessTimeoutTimeInSeconds() {
23 // 10s ought to be enough for anybody. 23 // 10s ought to be enough for anybody.
24 return 10; 24 return 10;
25 } 25 }
26 26
27 // Returns the number of threads of the current process or -1. 27 // Returns the number of threads of the current process or -1.
28 int CountThreads() { 28 int CountThreads() {
29 struct stat task_stat; 29 struct stat task_stat;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 fflush(stderr); 219 fflush(stderr);
220 _exit(kExitWithAssertionFailure); 220 _exit(kExitWithAssertionFailure);
221 } 221 }
222 222
223 void UnitTests::IgnoreThisTest() { 223 void UnitTests::IgnoreThisTest() {
224 fflush(stderr); 224 fflush(stderr);
225 _exit(kIgnoreThisTest); 225 _exit(kIgnoreThisTest);
226 } 226 }
227 227
228 } // namespace 228 } // namespace
OLDNEW
« no previous file with comments | « remoting/protocol/transport.cc ('k') | sql/statement.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698