// Data processing instructions.
-typedef InstructionSelectorTestWithParam<DPI> InstructionSelectorDPITest;
+namespace {
+
+class DPITest : public InstructionSelectorTestWithParam<DPI> {};
-TEST_P(InstructionSelectorDPITest, Parameters) {
+TEST_P(DPITest, Parameters) {
const DPI dpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return((m.*dpi.constructor)(m.Parameter(0), m.Parameter(1)));
}
-TEST_P(InstructionSelectorDPITest, Immediate) {
+TEST_P(DPITest, Immediate) {
const DPI dpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorDPITest, ShiftByParameter) {
+TEST_P(DPITest, ShiftByParameter) {
const DPI dpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorDPITest, ShiftByImmediate) {
+TEST_P(DPITest, ShiftByImmediate) {
const DPI dpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
}
-TEST_P(InstructionSelectorDPITest, BranchWithParameters) {
+TEST_P(DPITest, BranchWithParameters) {
const DPI dpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b;
}
-TEST_P(InstructionSelectorDPITest, BranchWithImmediate) {
+TEST_P(DPITest, BranchWithImmediate) {
const DPI dpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorDPITest, BranchWithShiftByParameter) {
+TEST_P(DPITest, BranchWithShiftByParameter) {
const DPI dpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorDPITest, BranchWithShiftByImmediate) {
+TEST_P(DPITest, BranchWithShiftByImmediate) {
const DPI dpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
}
-TEST_P(InstructionSelectorDPITest, BranchIfZeroWithParameters) {
+TEST_P(DPITest, BranchIfZeroWithParameters) {
const DPI dpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b;
}
-TEST_P(InstructionSelectorDPITest, BranchIfNotZeroWithParameters) {
+TEST_P(DPITest, BranchIfNotZeroWithParameters) {
const DPI dpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b;
}
-TEST_P(InstructionSelectorDPITest, BranchIfZeroWithImmediate) {
+TEST_P(DPITest, BranchIfZeroWithImmediate) {
const DPI dpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorDPITest, BranchIfNotZeroWithImmediate) {
+TEST_P(DPITest, BranchIfNotZeroWithImmediate) {
const DPI dpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
}
+} // namespace
+
-INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorDPITest,
+INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, DPITest,
::testing::ValuesIn(kDPIs));
// Data processing instructions with overflow.
-typedef InstructionSelectorTestWithParam<ODPI> InstructionSelectorODPITest;
+namespace {
+
+class ODPITest : public InstructionSelectorTestWithParam<ODPI> {};
-TEST_P(InstructionSelectorODPITest, OvfWithParameters) {
+TEST_P(ODPITest, OvfWithParameters) {
const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return(
}
-TEST_P(InstructionSelectorODPITest, OvfWithImmediate) {
+TEST_P(ODPITest, OvfWithImmediate) {
const ODPI odpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorODPITest, OvfWithShiftByParameter) {
+TEST_P(ODPITest, OvfWithShiftByParameter) {
const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorODPITest, OvfWithShiftByImmediate) {
+TEST_P(ODPITest, OvfWithShiftByImmediate) {
const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
}
-TEST_P(InstructionSelectorODPITest, ValWithParameters) {
+TEST_P(ODPITest, ValWithParameters) {
const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return(
}
-TEST_P(InstructionSelectorODPITest, ValWithImmediate) {
+TEST_P(ODPITest, ValWithImmediate) {
const ODPI odpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorODPITest, ValWithShiftByParameter) {
+TEST_P(ODPITest, ValWithShiftByParameter) {
const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorODPITest, ValWithShiftByImmediate) {
+TEST_P(ODPITest, ValWithShiftByImmediate) {
const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
}
-TEST_P(InstructionSelectorODPITest, BothWithParameters) {
+TEST_P(ODPITest, BothWithParameters) {
const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
Node* n = (m.*odpi.constructor)(m.Parameter(0), m.Parameter(1));
}
-TEST_P(InstructionSelectorODPITest, BothWithImmediate) {
+TEST_P(ODPITest, BothWithImmediate) {
const ODPI odpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorODPITest, BothWithShiftByParameter) {
+TEST_P(ODPITest, BothWithShiftByParameter) {
const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorODPITest, BothWithShiftByImmediate) {
+TEST_P(ODPITest, BothWithShiftByImmediate) {
const ODPI odpi = GetParam();
TRACED_FOREACH(Shift, shift, kShifts) {
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
}
-TEST_P(InstructionSelectorODPITest, BranchWithParameters) {
+TEST_P(ODPITest, BranchWithParameters) {
const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b;
}
-TEST_P(InstructionSelectorODPITest, BranchWithImmediate) {
+TEST_P(ODPITest, BranchWithImmediate) {
const ODPI odpi = GetParam();
TRACED_FOREACH(int32_t, imm, kImmediates) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorODPITest, BranchIfZeroWithParameters) {
+TEST_P(ODPITest, BranchIfZeroWithParameters) {
const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b;
}
-TEST_P(InstructionSelectorODPITest, BranchIfNotZeroWithParameters) {
+TEST_P(ODPITest, BranchIfNotZeroWithParameters) {
const ODPI odpi = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
MLabel a, b;
}
-INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorODPITest,
+} // namespace
+
+INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, ODPITest,
::testing::ValuesIn(kODPIs));
// Shifts.
-typedef InstructionSelectorTestWithParam<Shift> InstructionSelectorShiftTest;
+namespace {
+
+class ShiftTest : public InstructionSelectorTestWithParam<Shift> {};
-TEST_P(InstructionSelectorShiftTest, Parameters) {
+TEST_P(ShiftTest, Parameters) {
const Shift shift = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return((m.*shift.constructor)(m.Parameter(0), m.Parameter(1)));
}
-TEST_P(InstructionSelectorShiftTest, Immediate) {
+TEST_P(ShiftTest, Immediate) {
const Shift shift = GetParam();
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorShiftTest, Word32EqualWithParameter) {
+TEST_P(ShiftTest, Word32EqualWithParameter) {
const Shift shift = GetParam();
{
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorShiftTest, Word32EqualWithParameterAndImmediate) {
+TEST_P(ShiftTest, Word32EqualWithParameterAndImmediate) {
const Shift shift = GetParam();
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorShiftTest, Word32NotWithParameters) {
+TEST_P(ShiftTest, Word32NotWithParameters) {
const Shift shift = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
m.Return(m.Word32Not((m.*shift.constructor)(m.Parameter(0), m.Parameter(1))));
}
-TEST_P(InstructionSelectorShiftTest, Word32NotWithImmediate) {
+TEST_P(ShiftTest, Word32NotWithImmediate) {
const Shift shift = GetParam();
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
StreamBuilder m(this, kMachInt32, kMachInt32);
}
-TEST_P(InstructionSelectorShiftTest, Word32AndWithWord32NotWithParameters) {
+TEST_P(ShiftTest, Word32AndWithWord32NotWithParameters) {
const Shift shift = GetParam();
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32, kMachInt32);
m.Return(m.Word32And(m.Parameter(0), m.Word32Not((m.*shift.constructor)(
}
-TEST_P(InstructionSelectorShiftTest, Word32AndWithWord32NotWithImmediate) {
+TEST_P(ShiftTest, Word32AndWithWord32NotWithImmediate) {
const Shift shift = GetParam();
TRACED_FORRANGE(int32_t, imm, shift.i_low, shift.i_high) {
StreamBuilder m(this, kMachInt32, kMachInt32, kMachInt32);
}
-INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, InstructionSelectorShiftTest,
+} // namespace
+
+
+INSTANTIATE_TEST_CASE_P(InstructionSelectorTest, ShiftTest,
::testing::ValuesIn(kShifts));