Commit e0e17b90 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Revert "[arm] Shorter test names for parameterized tests."

This reverts commit r23142 because GoogleTest is very picky about the
parameterized test case names, so not even using an anonymous namespace
can please GTest. Also reverts the renaming applied to in the
ChangeLowering unit test.

TBR=jarin@chromium.org
BUG=v8:3489
LOG=n

Review URL: https://codereview.chromium.org/484953003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23177 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3170fbb3
...@@ -118,12 +118,10 @@ static const int32_t kImmediates[] = { ...@@ -118,12 +118,10 @@ static const int32_t kImmediates[] = {
// Data processing instructions. // Data processing instructions.
namespace { typedef InstructionSelectorTestWithParam<DPI> InstructionSelectorDPITest;
class DPITest : public InstructionSelectorTestWithParam<DPI> {};
TEST_P(DPITest, Parameters) { TEST_P(InstructionSelectorDPITest, Parameters) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return((m.*dpi.constructor)(m.Parameter(0), m.Parameter(1))); m.Return((m.*dpi.constructor)(m.Parameter(0), m.Parameter(1)));
...@@ -136,7 +134,7 @@ TEST_P(DPITest, Parameters) { ...@@ -136,7 +134,7 @@ TEST_P(DPITest, Parameters) {
} }
TEST_P(DPITest, Immediate) { TEST_P(InstructionSelectorDPITest, Immediate) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) { TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -163,7 +161,7 @@ TEST_P(DPITest, Immediate) { ...@@ -163,7 +161,7 @@ TEST_P(DPITest, Immediate) {
} }
TEST_P(DPITest, ShiftByParameter) { TEST_P(InstructionSelectorDPITest, ShiftByParameter) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
...@@ -192,7 +190,7 @@ TEST_P(DPITest, ShiftByParameter) { ...@@ -192,7 +190,7 @@ TEST_P(DPITest, ShiftByParameter) {
} }
TEST_P(DPITest, ShiftByImmediate) { TEST_P(InstructionSelectorDPITest, ShiftByImmediate) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
...@@ -227,7 +225,7 @@ TEST_P(DPITest, ShiftByImmediate) { ...@@ -227,7 +225,7 @@ TEST_P(DPITest, ShiftByImmediate) {
} }
TEST_P(DPITest, BranchWithParameters) { TEST_P(InstructionSelectorDPITest, BranchWithParameters) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b; MLabel a, b;
...@@ -245,7 +243,7 @@ TEST_P(DPITest, BranchWithParameters) { ...@@ -245,7 +243,7 @@ TEST_P(DPITest, BranchWithParameters) {
} }
TEST_P(DPITest, BranchWithImmediate) { TEST_P(InstructionSelectorDPITest, BranchWithImmediate) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) { TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -282,7 +280,7 @@ TEST_P(DPITest, BranchWithImmediate) { ...@@ -282,7 +280,7 @@ TEST_P(DPITest, BranchWithImmediate) {
} }
TEST_P(DPITest, BranchWithShiftByParameter) { TEST_P(InstructionSelectorDPITest, BranchWithShiftByParameter) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
...@@ -323,7 +321,7 @@ TEST_P(DPITest, BranchWithShiftByParameter) { ...@@ -323,7 +321,7 @@ TEST_P(DPITest, BranchWithShiftByParameter) {
} }
TEST_P(DPITest, BranchWithShiftByImmediate) { TEST_P(InstructionSelectorDPITest, BranchWithShiftByImmediate) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
...@@ -372,7 +370,7 @@ TEST_P(DPITest, BranchWithShiftByImmediate) { ...@@ -372,7 +370,7 @@ TEST_P(DPITest, BranchWithShiftByImmediate) {
} }
TEST_P(DPITest, BranchIfZeroWithParameters) { TEST_P(InstructionSelectorDPITest, BranchIfZeroWithParameters) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b; MLabel a, b;
...@@ -392,7 +390,7 @@ TEST_P(DPITest, BranchIfZeroWithParameters) { ...@@ -392,7 +390,7 @@ TEST_P(DPITest, BranchIfZeroWithParameters) {
} }
TEST_P(DPITest, BranchIfNotZeroWithParameters) { TEST_P(InstructionSelectorDPITest, BranchIfNotZeroWithParameters) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b; MLabel a, b;
...@@ -413,7 +411,7 @@ TEST_P(DPITest, BranchIfNotZeroWithParameters) { ...@@ -413,7 +411,7 @@ TEST_P(DPITest, BranchIfNotZeroWithParameters) {
} }
TEST_P(DPITest, BranchIfZeroWithImmediate) { TEST_P(InstructionSelectorDPITest, BranchIfZeroWithImmediate) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) { TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -454,7 +452,7 @@ TEST_P(DPITest, BranchIfZeroWithImmediate) { ...@@ -454,7 +452,7 @@ TEST_P(DPITest, BranchIfZeroWithImmediate) {
} }
TEST_P(DPITest, BranchIfNotZeroWithImmediate) { TEST_P(InstructionSelectorDPITest, BranchIfNotZeroWithImmediate) {
const DPI dpi = GetParam(); const DPI dpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) { TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -494,10 +492,8 @@ TEST_P(DPITest, BranchIfNotZeroWithImmediate) { ...@@ -494,10 +492,8 @@ TEST_P(DPITest, BranchIfNotZeroWithImmediate) {
} }
} }
} // namespace
INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, DPITest, INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorDPITest,
::testing::ValuesIn(kDPIs)); ::testing::ValuesIn(kDPIs));
...@@ -505,12 +501,10 @@ INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, DPITest, ...@@ -505,12 +501,10 @@ INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, DPITest,
// Data processing instructions with overflow. // Data processing instructions with overflow.
namespace { typedef InstructionSelectorTestWithParam<ODPI> InstructionSelectorODPITest;
class ODPITest : public InstructionSelectorTestWithParam<ODPI> {};
TEST_P(ODPITest, OvfWithParameters) { TEST_P(InstructionSelectorODPITest, OvfWithParameters) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return( m.Return(
...@@ -526,7 +520,7 @@ TEST_P(ODPITest, OvfWithParameters) { ...@@ -526,7 +520,7 @@ TEST_P(ODPITest, OvfWithParameters) {
} }
TEST_P(ODPITest, OvfWithImmediate) { TEST_P(InstructionSelectorODPITest, OvfWithImmediate) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) { TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -559,7 +553,7 @@ TEST_P(ODPITest, OvfWithImmediate) { ...@@ -559,7 +553,7 @@ TEST_P(ODPITest, OvfWithImmediate) {
} }
TEST_P(ODPITest, OvfWithShiftByParameter) { TEST_P(InstructionSelectorODPITest, OvfWithShiftByParameter) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
...@@ -594,7 +588,7 @@ TEST_P(ODPITest, OvfWithShiftByParameter) { ...@@ -594,7 +588,7 @@ TEST_P(ODPITest, OvfWithShiftByParameter) {
} }
TEST_P(ODPITest, OvfWithShiftByImmediate) { TEST_P(InstructionSelectorODPITest, OvfWithShiftByImmediate) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
...@@ -635,7 +629,7 @@ TEST_P(ODPITest, OvfWithShiftByImmediate) { ...@@ -635,7 +629,7 @@ TEST_P(ODPITest, OvfWithShiftByImmediate) {
} }
TEST_P(ODPITest, ValWithParameters) { TEST_P(InstructionSelectorODPITest, ValWithParameters) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return( m.Return(
...@@ -650,7 +644,7 @@ TEST_P(ODPITest, ValWithParameters) { ...@@ -650,7 +644,7 @@ TEST_P(ODPITest, ValWithParameters) {
} }
TEST_P(ODPITest, ValWithImmediate) { TEST_P(InstructionSelectorODPITest, ValWithImmediate) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) { TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -681,7 +675,7 @@ TEST_P(ODPITest, ValWithImmediate) { ...@@ -681,7 +675,7 @@ TEST_P(ODPITest, ValWithImmediate) {
} }
TEST_P(ODPITest, ValWithShiftByParameter) { TEST_P(InstructionSelectorODPITest, ValWithShiftByParameter) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
...@@ -714,7 +708,7 @@ TEST_P(ODPITest, ValWithShiftByParameter) { ...@@ -714,7 +708,7 @@ TEST_P(ODPITest, ValWithShiftByParameter) {
} }
TEST_P(ODPITest, ValWithShiftByImmediate) { TEST_P(InstructionSelectorODPITest, ValWithShiftByImmediate) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
...@@ -753,7 +747,7 @@ TEST_P(ODPITest, ValWithShiftByImmediate) { ...@@ -753,7 +747,7 @@ TEST_P(ODPITest, ValWithShiftByImmediate) {
} }
TEST_P(ODPITest, BothWithParameters) { TEST_P(InstructionSelectorODPITest, BothWithParameters) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
Node* n = (m.*odpi.constructor)(m.Parameter(0), m.Parameter(1)); Node* n = (m.*odpi.constructor)(m.Parameter(0), m.Parameter(1));
...@@ -769,7 +763,7 @@ TEST_P(ODPITest, BothWithParameters) { ...@@ -769,7 +763,7 @@ TEST_P(ODPITest, BothWithParameters) {
} }
TEST_P(ODPITest, BothWithImmediate) { TEST_P(InstructionSelectorODPITest, BothWithImmediate) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) { TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -802,7 +796,7 @@ TEST_P(ODPITest, BothWithImmediate) { ...@@ -802,7 +796,7 @@ TEST_P(ODPITest, BothWithImmediate) {
} }
TEST_P(ODPITest, BothWithShiftByParameter) { TEST_P(InstructionSelectorODPITest, BothWithShiftByParameter) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
...@@ -835,7 +829,7 @@ TEST_P(ODPITest, BothWithShiftByParameter) { ...@@ -835,7 +829,7 @@ TEST_P(ODPITest, BothWithShiftByParameter) {
} }
TEST_P(ODPITest, BothWithShiftByImmediate) { TEST_P(InstructionSelectorODPITest, BothWithShiftByImmediate) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) { TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
...@@ -876,7 +870,7 @@ TEST_P(ODPITest, BothWithShiftByImmediate) { ...@@ -876,7 +870,7 @@ TEST_P(ODPITest, BothWithShiftByImmediate) {
} }
TEST_P(ODPITest, BranchWithParameters) { TEST_P(InstructionSelectorODPITest, BranchWithParameters) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b; MLabel a, b;
...@@ -897,7 +891,7 @@ TEST_P(ODPITest, BranchWithParameters) { ...@@ -897,7 +891,7 @@ TEST_P(ODPITest, BranchWithParameters) {
} }
TEST_P(ODPITest, BranchWithImmediate) { TEST_P(InstructionSelectorODPITest, BranchWithImmediate) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) { TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -940,7 +934,7 @@ TEST_P(ODPITest, BranchWithImmediate) { ...@@ -940,7 +934,7 @@ TEST_P(ODPITest, BranchWithImmediate) {
} }
TEST_P(ODPITest, BranchIfZeroWithParameters) { TEST_P(InstructionSelectorODPITest, BranchIfZeroWithParameters) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b; MLabel a, b;
...@@ -961,7 +955,7 @@ TEST_P(ODPITest, BranchIfZeroWithParameters) { ...@@ -961,7 +955,7 @@ TEST_P(ODPITest, BranchIfZeroWithParameters) {
} }
TEST_P(ODPITest, BranchIfNotZeroWithParameters) { TEST_P(InstructionSelectorODPITest, BranchIfNotZeroWithParameters) {
const ODPI odpi = GetParam(); const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b; MLabel a, b;
...@@ -982,9 +976,7 @@ TEST_P(ODPITest, BranchIfNotZeroWithParameters) { ...@@ -982,9 +976,7 @@ TEST_P(ODPITest, BranchIfNotZeroWithParameters) {
} }
} // namespace INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorODPITest,
INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, ODPITest,
::testing::ValuesIn(kODPIs)); ::testing::ValuesIn(kODPIs));
...@@ -992,12 +984,10 @@ INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, ODPITest, ...@@ -992,12 +984,10 @@ INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, ODPITest,
// Shifts. // Shifts.
namespace { typedef InstructionSelectorTestWithParam<Shift> InstructionSelectorShiftTest;
class ShiftTest : public InstructionSelectorTestWithParam<Shift> {};
TEST_P(ShiftTest, Parameters) { TEST_P(InstructionSelectorShiftTest, Parameters) {
const Shift shift = GetParam(); const Shift shift = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return((m.*shift.constructor)(m.Parameter(0), m.Parameter(1))); m.Return((m.*shift.constructor)(m.Parameter(0), m.Parameter(1)));
...@@ -1010,7 +1000,7 @@ TEST_P(ShiftTest, Parameters) { ...@@ -1010,7 +1000,7 @@ TEST_P(ShiftTest, Parameters) {
} }
TEST_P(ShiftTest, Immediate) { TEST_P(InstructionSelectorShiftTest, Immediate) {
const Shift shift = GetParam(); const Shift shift = GetParam();
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -1026,7 +1016,7 @@ TEST_P(ShiftTest, Immediate) { ...@@ -1026,7 +1016,7 @@ TEST_P(ShiftTest, Immediate) {
} }
TEST_P(ShiftTest, Word32EqualWithParameter) { TEST_P(InstructionSelectorShiftTest, Word32EqualWithParameter) {
const Shift shift = GetParam(); const Shift shift = GetParam();
{ {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
...@@ -1059,7 +1049,7 @@ TEST_P(ShiftTest, Word32EqualWithParameter) { ...@@ -1059,7 +1049,7 @@ TEST_P(ShiftTest, Word32EqualWithParameter) {
} }
TEST_P(ShiftTest, Word32EqualWithParameterAndImmediate) { TEST_P(InstructionSelectorShiftTest, Word32EqualWithParameterAndImmediate) {
const Shift shift = GetParam(); const Shift shift = GetParam();
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
...@@ -1094,7 +1084,7 @@ TEST_P(ShiftTest, Word32EqualWithParameterAndImmediate) { ...@@ -1094,7 +1084,7 @@ TEST_P(ShiftTest, Word32EqualWithParameterAndImmediate) {
} }
TEST_P(ShiftTest, Word32EqualToZeroWithParameters) { TEST_P(InstructionSelectorShiftTest, Word32EqualToZeroWithParameters) {
const Shift shift = GetParam(); const Shift shift = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return( m.Return(
...@@ -1111,7 +1101,7 @@ TEST_P(ShiftTest, Word32EqualToZeroWithParameters) { ...@@ -1111,7 +1101,7 @@ TEST_P(ShiftTest, Word32EqualToZeroWithParameters) {
} }
TEST_P(ShiftTest, Word32EqualToZeroWithImmediate) { TEST_P(InstructionSelectorShiftTest, Word32EqualToZeroWithImmediate) {
const Shift shift = GetParam(); const Shift shift = GetParam();
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
...@@ -1131,7 +1121,7 @@ TEST_P(ShiftTest, Word32EqualToZeroWithImmediate) { ...@@ -1131,7 +1121,7 @@ TEST_P(ShiftTest, Word32EqualToZeroWithImmediate) {
} }
TEST_P(ShiftTest, Word32NotWithParameters) { TEST_P(InstructionSelectorShiftTest, Word32NotWithParameters) {
const Shift shift = GetParam(); const Shift shift = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return(m.Word32Not((m.*shift.constructor)(m.Parameter(0), m.Parameter(1)))); m.Return(m.Word32Not((m.*shift.constructor)(m.Parameter(0), m.Parameter(1))));
...@@ -1144,7 +1134,7 @@ TEST_P(ShiftTest, Word32NotWithParameters) { ...@@ -1144,7 +1134,7 @@ TEST_P(ShiftTest, Word32NotWithParameters) {
} }
TEST_P(ShiftTest, Word32NotWithImmediate) { TEST_P(InstructionSelectorShiftTest, Word32NotWithImmediate) {
const Shift shift = GetParam(); const Shift shift = GetParam();
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
StreamBuilder m(this, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32);
...@@ -1161,7 +1151,7 @@ TEST_P(ShiftTest, Word32NotWithImmediate) { ...@@ -1161,7 +1151,7 @@ TEST_P(ShiftTest, Word32NotWithImmediate) {
} }
TEST_P(ShiftTest, Word32AndWithWord32NotWithParameters) { TEST_P(InstructionSelectorShiftTest, Word32AndWithWord32NotWithParameters) {
const Shift shift = GetParam(); const Shift shift = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
m.Return(m.Word32And(m.Parameter(0), m.Word32Not((m.*shift.constructor)( m.Return(m.Word32And(m.Parameter(0), m.Word32Not((m.*shift.constructor)(
...@@ -1175,7 +1165,7 @@ TEST_P(ShiftTest, Word32AndWithWord32NotWithParameters) { ...@@ -1175,7 +1165,7 @@ TEST_P(ShiftTest, Word32AndWithWord32NotWithParameters) {
} }
TEST_P(ShiftTest, Word32AndWithWord32NotWithImmediate) { TEST_P(InstructionSelectorShiftTest, Word32AndWithWord32NotWithImmediate) {
const Shift shift = GetParam(); const Shift shift = GetParam();
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) { TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32); StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
...@@ -1193,10 +1183,7 @@ TEST_P(ShiftTest, Word32AndWithWord32NotWithImmediate) { ...@@ -1193,10 +1183,7 @@ TEST_P(ShiftTest, Word32AndWithWord32NotWithImmediate) {
} }
} // namespace INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorShiftTest,
INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, ShiftTest,
::testing::ValuesIn(kShifts)); ::testing::ValuesIn(kShifts));
......
...@@ -113,12 +113,12 @@ class ChangeLoweringTest : public GraphTest { ...@@ -113,12 +113,12 @@ class ChangeLoweringTest : public GraphTest {
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Common. // Common.
namespace {
class Common : public ChangeLoweringTest, class ChangeLoweringCommonTest
: public ChangeLoweringTest,
public ::testing::WithParamInterface<MachineType> { public ::testing::WithParamInterface<MachineType> {
public: public:
virtual ~Common() {} virtual ~ChangeLoweringCommonTest() {}
virtual MachineType WordRepresentation() const V8_FINAL V8_OVERRIDE { virtual MachineType WordRepresentation() const V8_FINAL V8_OVERRIDE {
return GetParam(); return GetParam();
...@@ -126,7 +126,7 @@ class Common : public ChangeLoweringTest, ...@@ -126,7 +126,7 @@ class Common : public ChangeLoweringTest,
}; };
TARGET_TEST_P(Common, ChangeBitToBool) { TARGET_TEST_P(ChangeLoweringCommonTest, ChangeBitToBool) {
Node* val = Parameter(0); Node* val = Parameter(0);
Node* node = graph()->NewNode(simplified()->ChangeBitToBool(), val); Node* node = graph()->NewNode(simplified()->ChangeBitToBool(), val);
Reduction reduction = Reduce(node); Reduction reduction = Reduce(node);
...@@ -142,7 +142,7 @@ TARGET_TEST_P(Common, ChangeBitToBool) { ...@@ -142,7 +142,7 @@ TARGET_TEST_P(Common, ChangeBitToBool) {
} }
TARGET_TEST_P(Common, ChangeBoolToBit) { TARGET_TEST_P(ChangeLoweringCommonTest, ChangeBoolToBit) {
Node* val = Parameter(0); Node* val = Parameter(0);
Node* node = graph()->NewNode(simplified()->ChangeBoolToBit(), val); Node* node = graph()->NewNode(simplified()->ChangeBoolToBit(), val);
Reduction reduction = Reduce(node); Reduction reduction = Reduce(node);
...@@ -152,7 +152,7 @@ TARGET_TEST_P(Common, ChangeBoolToBit) { ...@@ -152,7 +152,7 @@ TARGET_TEST_P(Common, ChangeBoolToBit) {
} }
TARGET_TEST_P(Common, ChangeFloat64ToTagged) { TARGET_TEST_P(ChangeLoweringCommonTest, ChangeFloat64ToTagged) {
Node* val = Parameter(0); Node* val = Parameter(0);
Node* node = graph()->NewNode(simplified()->ChangeFloat64ToTagged(), val); Node* node = graph()->NewNode(simplified()->ChangeFloat64ToTagged(), val);
Reduction reduction = Reduce(node); Reduction reduction = Reduce(node);
...@@ -171,17 +171,15 @@ TARGET_TEST_P(Common, ChangeFloat64ToTagged) { ...@@ -171,17 +171,15 @@ TARGET_TEST_P(Common, ChangeFloat64ToTagged) {
} }
TARGET_TEST_P(Common, StringAdd) { TARGET_TEST_P(ChangeLoweringCommonTest, StringAdd) {
Node* node = Node* node =
graph()->NewNode(simplified()->StringAdd(), Parameter(0), Parameter(1)); graph()->NewNode(simplified()->StringAdd(), Parameter(0), Parameter(1));
Reduction reduction = Reduce(node); Reduction reduction = Reduce(node);
EXPECT_FALSE(reduction.Changed()); EXPECT_FALSE(reduction.Changed());
} }
} // namespace
INSTANTIATE_TEST_CASE_P(ChangeLoweringTest, ChangeLoweringCommonTest,
INSTANTIATE_TEST_CASE_P(ChangeLoweringTest, Common,
::testing::Values(kRepWord32, kRepWord64)); ::testing::Values(kRepWord32, kRepWord64));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment