summaryrefslogtreecommitdiffstats
path: root/cc/scheduler/scheduler_state_machine_unittest.cc
diff options
context:
space:
mode:
authormithro <mithro@mithis.com>2014-10-13 03:57:06 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-13 10:57:28 +0000
commit06968cb7a6534e631481d0f20b3c666cc2f98805 (patch)
treeb82b77825ff6541ced7423ba92b5db38c60fde4e /cc/scheduler/scheduler_state_machine_unittest.cc
parentcd6462dff5ee1d5db41975dab24bcffde7e6c156 (diff)
downloadchromium_src-06968cb7a6534e631481d0f20b3c666cc2f98805.zip
chromium_src-06968cb7a6534e631481d0f20b3c666cc2f98805.tar.gz
chromium_src-06968cb7a6534e631481d0f20b3c666cc2f98805.tar.bz2
Make EXPECT_ACTION_UPDATE_STATE failure output easier to understand.
Changes; ------------------------------------------------------------------------------- Value of: state.NextAction() Actual: 1 Expected: SchedulerStateMachine::ACTION_DRAW_AND_SWAP_ABORT Which is: 8 ------------------------------------------------------------------------------- to ------------------------------------------------------------------------------- Value of: SchedulerStateMachine::ActionToString(state.NextAction()) Actual: "ACTION_NONE" Expected: SchedulerStateMachine::ActionToString( SchedulerStateMachine::ACTION_DRAW_AND_SWAP_ABORT) Which is: "ACTION_DRAW_AND_SWAP_ABORT" ------------------------------------------------------------------------------- BUG=416749 Review URL: https://codereview.chromium.org/639963006 Cr-Commit-Position: refs/heads/master@{#299282}
Diffstat (limited to 'cc/scheduler/scheduler_state_machine_unittest.cc')
-rw-r--r--cc/scheduler/scheduler_state_machine_unittest.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/scheduler/scheduler_state_machine_unittest.cc b/cc/scheduler/scheduler_state_machine_unittest.cc
index e19678d..286eb47 100644
--- a/cc/scheduler/scheduler_state_machine_unittest.cc
+++ b/cc/scheduler/scheduler_state_machine_unittest.cc
@@ -10,7 +10,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#define EXPECT_ACTION_UPDATE_STATE(action) \
- EXPECT_EQ(action, state.NextAction()) << state.AsValue()->ToString(); \
+ EXPECT_STREQ(SchedulerStateMachine::ActionToString(action), \
+ SchedulerStateMachine::ActionToString(state.NextAction())) \
+ << state.AsValue()->ToString(); \
if (action == SchedulerStateMachine::ACTION_DRAW_AND_SWAP_IF_POSSIBLE || \
action == SchedulerStateMachine::ACTION_DRAW_AND_SWAP_FORCED) { \
EXPECT_EQ(SchedulerStateMachine::BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE, \