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

Side by Side Diff: mojo/edk/system/core_unittest.cc

Issue 1987623003: [mojo-edk] Fix test expectations for official builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | mojo/edk/system/options_validation_unittest.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 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 #include "mojo/edk/system/core.h" 5 #include "mojo/edk/system/core.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 } 438 }
439 } 439 }
440 440
441 // These test invalid arguments that should cause death if we're being paranoid 441 // These test invalid arguments that should cause death if we're being paranoid
442 // about checking arguments (which we would want to do if, e.g., we were in a 442 // about checking arguments (which we would want to do if, e.g., we were in a
443 // true "kernel" situation, but we might not want to do otherwise for 443 // true "kernel" situation, but we might not want to do otherwise for
444 // performance reasons). Probably blatant errors like passing in null pointers 444 // performance reasons). Probably blatant errors like passing in null pointers
445 // (for required pointer arguments) will still cause death, but perhaps not 445 // (for required pointer arguments) will still cause death, but perhaps not
446 // predictably. 446 // predictably.
447 TEST_F(CoreTest, InvalidArgumentsDeath) { 447 TEST_F(CoreTest, InvalidArgumentsDeath) {
448 #if defined(OFFICIAL_BUILD)
449 const char kMemoryCheckFailedRegex[] = "";
450 #else
448 const char kMemoryCheckFailedRegex[] = "Check failed"; 451 const char kMemoryCheckFailedRegex[] = "Check failed";
452 #endif
449 453
450 // |WaitMany()|: 454 // |WaitMany()|:
451 { 455 {
452 MojoHandle handle = MOJO_HANDLE_INVALID; 456 MojoHandle handle = MOJO_HANDLE_INVALID;
453 MojoHandleSignals signals = ~MOJO_HANDLE_SIGNAL_NONE; 457 MojoHandleSignals signals = ~MOJO_HANDLE_SIGNAL_NONE;
454 ASSERT_DEATH_IF_SUPPORTED( 458 ASSERT_DEATH_IF_SUPPORTED(
455 core()->WaitMany(nullptr, &signals, 1, MOJO_DEADLINE_INDEFINITE, 459 core()->WaitMany(nullptr, &signals, 1, MOJO_DEADLINE_INDEFINITE,
456 nullptr, nullptr), 460 nullptr, nullptr),
457 kMemoryCheckFailedRegex); 461 kMemoryCheckFailedRegex);
458 ASSERT_DEATH_IF_SUPPORTED( 462 ASSERT_DEATH_IF_SUPPORTED(
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 ASSERT_EQ(MOJO_RESULT_BUSY, waiter.result); 1265 ASSERT_EQ(MOJO_RESULT_BUSY, waiter.result);
1262 1266
1263 ASSERT_EQ(MOJO_RESULT_OK, core()->Close(h)); 1267 ASSERT_EQ(MOJO_RESULT_OK, core()->Close(h));
1264 } 1268 }
1265 1269
1266 // TODO(vtl): Test |DuplicateBufferHandle()| and |MapBuffer()|. 1270 // TODO(vtl): Test |DuplicateBufferHandle()| and |MapBuffer()|.
1267 1271
1268 } // namespace 1272 } // namespace
1269 } // namespace edk 1273 } // namespace edk
1270 } // namespace mojo 1274 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/options_validation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698