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

Side by Side Diff: base/process/process_util_unittest.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 (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 #define _CRT_SECURE_NO_WARNINGS 5 #define _CRT_SECURE_NO_WARNINGS
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 base::FilePath expected; 214 base::FilePath expected;
215 CHECK(base::GetTempDir(&expected)); 215 CHECK(base::GetTempDir(&expected));
216 expected = MakeAbsoluteFilePath(expected); 216 expected = MakeAbsoluteFilePath(expected);
217 CHECK(!expected.empty()); 217 CHECK(!expected.empty());
218 218
219 base::FilePath actual; 219 base::FilePath actual;
220 CHECK(base::GetCurrentDirectory(&actual)); 220 CHECK(base::GetCurrentDirectory(&actual));
221 actual = MakeAbsoluteFilePath(actual); 221 actual = MakeAbsoluteFilePath(actual);
222 CHECK(!actual.empty()); 222 CHECK(!actual.empty());
223 223
224 CHECK(expected == actual) << "Expected: " << expected.value() 224 CHECK(expected == actual);
225 << " Actual: " << actual.value();
226 return kSuccess; 225 return kSuccess;
227 } 226 }
228 227
229 TEST_F(ProcessUtilTest, CurrentDirectory) { 228 TEST_F(ProcessUtilTest, CurrentDirectory) {
230 // TODO(rickyz): Add support for passing arguments to multiprocess children, 229 // TODO(rickyz): Add support for passing arguments to multiprocess children,
231 // then create a special directory for this test. 230 // then create a special directory for this test.
232 base::FilePath tmp_dir; 231 base::FilePath tmp_dir;
233 ASSERT_TRUE(base::GetTempDir(&tmp_dir)); 232 ASSERT_TRUE(base::GetTempDir(&tmp_dir));
234 233
235 base::LaunchOptions options; 234 base::LaunchOptions options;
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 options.current_directory = base::FilePath("/dev/null"); 1019 options.current_directory = base::FilePath("/dev/null");
1021 1020
1022 base::Process process(SpawnChildWithOptions("SimpleChildProcess", options)); 1021 base::Process process(SpawnChildWithOptions("SimpleChildProcess", options));
1023 ASSERT_TRUE(process.IsValid()); 1022 ASSERT_TRUE(process.IsValid());
1024 1023
1025 int exit_code = kSuccess; 1024 int exit_code = kSuccess;
1026 EXPECT_TRUE(process.WaitForExit(&exit_code)); 1025 EXPECT_TRUE(process.WaitForExit(&exit_code));
1027 EXPECT_NE(kSuccess, exit_code); 1026 EXPECT_NE(kSuccess, exit_code);
1028 } 1027 }
1029 #endif // defined(OS_LINUX) 1028 #endif // defined(OS_LINUX)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698