Index: third_party/crashpad/crashpad/client/simulate_crash_mac_test.cc |
diff --git a/third_party/crashpad/crashpad/client/simulate_crash_mac_test.cc b/third_party/crashpad/crashpad/client/simulate_crash_mac_test.cc |
index 87c5f845e928c6756cfcf9622b062c06f990d06e..de91ebb27834b82f5c889e91ddc2fd0319012c94 100644 |
--- a/third_party/crashpad/crashpad/client/simulate_crash_mac_test.cc |
+++ b/third_party/crashpad/crashpad/client/simulate_crash_mac_test.cc |
@@ -101,41 +101,41 @@ class TestSimulateCrashMac final : public MachMultiprocess, |
// Check the entire exception message, because most or all of it was |
// generated by SimulateCrash() instead of the kernel. |
- EXPECT_EQ(behavior_, behavior); |
- EXPECT_EQ(LocalPort(), exception_port); |
+ EXPECT_EQ(behavior, behavior_); |
+ EXPECT_EQ(exception_port, LocalPort()); |
if (ExceptionBehaviorHasIdentity(behavior)) { |
- EXPECT_NE(THREAD_NULL, thread); |
- EXPECT_EQ(ChildTask(), task); |
+ EXPECT_NE(thread, THREAD_NULL); |
+ EXPECT_EQ(task, ChildTask()); |
} else { |
- EXPECT_EQ(THREAD_NULL, thread); |
- EXPECT_EQ(TASK_NULL, task); |
+ EXPECT_EQ(thread, THREAD_NULL); |
+ EXPECT_EQ(task, TASK_NULL); |
} |
- EXPECT_EQ(kMachExceptionSimulated, exception); |
- EXPECT_EQ(2u, code_count); |
+ EXPECT_EQ(exception, kMachExceptionSimulated); |
+ EXPECT_EQ(code_count, 2u); |
if (code_count >= 1) { |
- EXPECT_EQ(0, code[0]); |
+ EXPECT_EQ(code[0], 0); |
} |
if (code_count >= 2) { |
- EXPECT_EQ(0, code[1]); |
+ EXPECT_EQ(code[1], 0); |
} |
if (!ExceptionBehaviorHasState(behavior)) { |
- EXPECT_EQ(THREAD_STATE_NONE, *flavor); |
+ EXPECT_EQ(*flavor, THREAD_STATE_NONE); |
} else { |
- EXPECT_EQ(flavor_, *flavor); |
+ EXPECT_EQ(*flavor, flavor_); |
switch (*flavor) { |
#if defined(ARCH_CPU_X86_FAMILY) |
case x86_THREAD_STATE: { |
- EXPECT_EQ(x86_THREAD_STATE_COUNT, old_state_count); |
+ EXPECT_EQ(old_state_count, x86_THREAD_STATE_COUNT); |
const x86_thread_state* state = |
reinterpret_cast<const x86_thread_state*>(old_state); |
switch (state->tsh.flavor) { |
case x86_THREAD_STATE32: |
- EXPECT_EQ(implicit_cast<int>(x86_THREAD_STATE32_COUNT), |
- state->tsh.count); |
+ EXPECT_EQ(state->tsh.count, |
+ implicit_cast<int>(x86_THREAD_STATE32_COUNT)); |
break; |
case x86_THREAD_STATE64: |
- EXPECT_EQ(implicit_cast<int>(x86_THREAD_STATE64_COUNT), |
- state->tsh.count); |
+ EXPECT_EQ(state->tsh.count, |
+ implicit_cast<int>(x86_THREAD_STATE64_COUNT)); |
break; |
default: |
ADD_FAILURE() << "unexpected tsh.flavor " << state->tsh.flavor; |
@@ -144,17 +144,17 @@ class TestSimulateCrashMac final : public MachMultiprocess, |
break; |
} |
case x86_FLOAT_STATE: { |
- EXPECT_EQ(x86_FLOAT_STATE_COUNT, old_state_count); |
+ EXPECT_EQ(old_state_count, x86_FLOAT_STATE_COUNT); |
const x86_float_state* state = |
reinterpret_cast<const x86_float_state*>(old_state); |
switch (state->fsh.flavor) { |
case x86_FLOAT_STATE32: |
- EXPECT_EQ(implicit_cast<int>(x86_FLOAT_STATE32_COUNT), |
- state->fsh.count); |
+ EXPECT_EQ(state->fsh.count, |
+ implicit_cast<int>(x86_FLOAT_STATE32_COUNT)); |
break; |
case x86_FLOAT_STATE64: |
- EXPECT_EQ(implicit_cast<int>(x86_FLOAT_STATE64_COUNT), |
- state->fsh.count); |
+ EXPECT_EQ(state->fsh.count, |
+ implicit_cast<int>(x86_FLOAT_STATE64_COUNT)); |
break; |
default: |
ADD_FAILURE() << "unexpected fsh.flavor " << state->fsh.flavor; |
@@ -163,17 +163,17 @@ class TestSimulateCrashMac final : public MachMultiprocess, |
break; |
} |
case x86_DEBUG_STATE: { |
- EXPECT_EQ(x86_DEBUG_STATE_COUNT, old_state_count); |
+ EXPECT_EQ(old_state_count, x86_DEBUG_STATE_COUNT); |
const x86_debug_state* state = |
reinterpret_cast<const x86_debug_state*>(old_state); |
switch (state->dsh.flavor) { |
case x86_DEBUG_STATE32: |
- EXPECT_EQ(implicit_cast<int>(x86_DEBUG_STATE32_COUNT), |
- state->dsh.count); |
+ EXPECT_EQ(state->dsh.count, |
+ implicit_cast<int>(x86_DEBUG_STATE32_COUNT)); |
break; |
case x86_DEBUG_STATE64: |
- EXPECT_EQ(implicit_cast<int>(x86_DEBUG_STATE64_COUNT), |
- state->dsh.count); |
+ EXPECT_EQ(state->dsh.count, |
+ implicit_cast<int>(x86_DEBUG_STATE64_COUNT)); |
break; |
default: |
ADD_FAILURE() << "unexpected dsh.flavor " << state->dsh.flavor; |
@@ -182,22 +182,22 @@ class TestSimulateCrashMac final : public MachMultiprocess, |
break; |
} |
case x86_THREAD_STATE32: |
- EXPECT_EQ(x86_THREAD_STATE32_COUNT, old_state_count); |
+ EXPECT_EQ(old_state_count, x86_THREAD_STATE32_COUNT); |
break; |
case x86_FLOAT_STATE32: |
- EXPECT_EQ(x86_FLOAT_STATE32_COUNT, old_state_count); |
+ EXPECT_EQ(old_state_count, x86_FLOAT_STATE32_COUNT); |
break; |
case x86_DEBUG_STATE32: |
- EXPECT_EQ(x86_DEBUG_STATE32_COUNT, old_state_count); |
+ EXPECT_EQ(old_state_count, x86_DEBUG_STATE32_COUNT); |
break; |
case x86_THREAD_STATE64: |
- EXPECT_EQ(x86_THREAD_STATE64_COUNT, old_state_count); |
+ EXPECT_EQ(old_state_count, x86_THREAD_STATE64_COUNT); |
break; |
case x86_FLOAT_STATE64: |
- EXPECT_EQ(x86_FLOAT_STATE64_COUNT, old_state_count); |
+ EXPECT_EQ(old_state_count, x86_FLOAT_STATE64_COUNT); |
break; |
case x86_DEBUG_STATE64: |
- EXPECT_EQ(x86_DEBUG_STATE64_COUNT, old_state_count); |
+ EXPECT_EQ(old_state_count, x86_DEBUG_STATE64_COUNT); |
break; |
#else |
#error Port to your CPU architecture |
@@ -223,7 +223,7 @@ class TestSimulateCrashMac final : public MachMultiprocess, |
// thread-level EXC_CRASH handler. To test that it will fall back to |
// trying the task-level EXC_CRASH handler, return a failure code, which |
// should cause SimulateCrash() to try the next target. |
- EXPECT_EQ(kExceptionPortsTargetBoth, target_); |
+ EXPECT_EQ(target_, kExceptionPortsTargetBoth); |
return KERN_ABORTED; |
} |
@@ -259,7 +259,7 @@ class TestSimulateCrashMac final : public MachMultiprocess, |
MachMessageServer::kOneShot, |
MachMessageServer::kReceiveLargeError, |
kMachMessageTimeoutWaitIndefinitely); |
- EXPECT_EQ(MACH_MSG_SUCCESS, mr) |
+ EXPECT_EQ(mr, MACH_MSG_SUCCESS) |
<< MachErrorMessage(mr, "MachMessageServer::Run"); |
} |
@@ -270,7 +270,7 @@ class TestSimulateCrashMac final : public MachMultiprocess, |
MachMessageServer::kOneShot, |
MachMessageServer::kReceiveLargeError, |
kMachMessageTimeoutWaitIndefinitely); |
- EXPECT_EQ(MACH_MSG_SUCCESS, mr) |
+ EXPECT_EQ(mr, MACH_MSG_SUCCESS) |
<< MachErrorMessage(mr, "MachMessageServer::Run"); |
} |