Index: test/unittests/compiler/common-operator-unittest.cc |
diff --git a/test/unittests/compiler/common-operator-unittest.cc b/test/unittests/compiler/common-operator-unittest.cc |
index 269049e0343aaa82c506b711d1164f51110e4bab..2c88c4bbd7e23088d0bcee0629f3c6d0e477f6ad 100644 |
--- a/test/unittests/compiler/common-operator-unittest.cc |
+++ b/test/unittests/compiler/common-operator-unittest.cc |
@@ -75,20 +75,16 @@ TEST_P(CommonSharedOperatorTest, NumberOfInputsAndOutputs) { |
const SharedOperator& sop = GetParam(); |
const Operator* op = (common.*sop.constructor)(); |
- EXPECT_EQ(sop.value_input_count, OperatorProperties::GetValueInputCount(op)); |
- EXPECT_EQ(sop.effect_input_count, |
- OperatorProperties::GetEffectInputCount(op)); |
- EXPECT_EQ(sop.control_input_count, |
- OperatorProperties::GetControlInputCount(op)); |
+ EXPECT_EQ(sop.value_input_count, op->ValueInputCount()); |
+ EXPECT_EQ(sop.effect_input_count, op->EffectInputCount()); |
+ EXPECT_EQ(sop.control_input_count, op->ControlInputCount()); |
EXPECT_EQ( |
sop.value_input_count + sop.effect_input_count + sop.control_input_count, |
OperatorProperties::GetTotalInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetValueOutputCount(op)); |
- EXPECT_EQ(sop.effect_output_count, |
- OperatorProperties::GetEffectOutputCount(op)); |
- EXPECT_EQ(sop.control_output_count, |
- OperatorProperties::GetControlOutputCount(op)); |
+ EXPECT_EQ(0, op->ValueOutputCount()); |
+ EXPECT_EQ(sop.effect_output_count, op->EffectOutputCount()); |
+ EXPECT_EQ(sop.control_output_count, op->ControlOutputCount()); |
} |
@@ -169,13 +165,13 @@ TEST_F(CommonOperatorTest, Branch) { |
EXPECT_EQ(IrOpcode::kBranch, op->opcode()); |
EXPECT_EQ(Operator::kFoldable, op->properties()); |
EXPECT_EQ(hint, BranchHintOf(op)); |
- EXPECT_EQ(1, OperatorProperties::GetValueInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetEffectInputCount(op)); |
- EXPECT_EQ(1, OperatorProperties::GetControlInputCount(op)); |
+ EXPECT_EQ(1, op->ValueInputCount()); |
+ EXPECT_EQ(0, op->EffectInputCount()); |
+ EXPECT_EQ(1, op->ControlInputCount()); |
EXPECT_EQ(2, OperatorProperties::GetTotalInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetValueOutputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); |
- EXPECT_EQ(2, OperatorProperties::GetControlOutputCount(op)); |
+ EXPECT_EQ(0, op->ValueOutputCount()); |
+ EXPECT_EQ(0, op->EffectOutputCount()); |
+ EXPECT_EQ(2, op->ControlOutputCount()); |
} |
} |
@@ -192,13 +188,13 @@ TEST_F(CommonOperatorTest, Select) { |
EXPECT_EQ(Operator::kPure, op->properties()); |
EXPECT_EQ(type, SelectParametersOf(op).type()); |
EXPECT_EQ(hint, SelectParametersOf(op).hint()); |
- EXPECT_EQ(3, OperatorProperties::GetValueInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetEffectInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetControlInputCount(op)); |
+ EXPECT_EQ(3, op->ValueInputCount()); |
+ EXPECT_EQ(0, op->EffectInputCount()); |
+ EXPECT_EQ(0, op->ControlInputCount()); |
EXPECT_EQ(3, OperatorProperties::GetTotalInputCount(op)); |
- EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); |
+ EXPECT_EQ(1, op->ValueOutputCount()); |
+ EXPECT_EQ(0, op->EffectOutputCount()); |
+ EXPECT_EQ(0, op->ControlOutputCount()); |
} |
} |
} |
@@ -208,11 +204,11 @@ TEST_F(CommonOperatorTest, Float32Constant) { |
TRACED_FOREACH(float, value, kFloatValues) { |
const Operator* op = common()->Float32Constant(value); |
EXPECT_PRED2(base::bit_equal_to<float>(), value, OpParameter<float>(op)); |
- EXPECT_EQ(0, OperatorProperties::GetValueInputCount(op)); |
+ EXPECT_EQ(0, op->ValueInputCount()); |
EXPECT_EQ(0, OperatorProperties::GetTotalInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); |
- EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); |
+ EXPECT_EQ(0, op->ControlOutputCount()); |
+ EXPECT_EQ(0, op->EffectOutputCount()); |
+ EXPECT_EQ(1, op->ValueOutputCount()); |
} |
TRACED_FOREACH(float, v1, kFloatValues) { |
TRACED_FOREACH(float, v2, kFloatValues) { |
@@ -229,11 +225,11 @@ TEST_F(CommonOperatorTest, Float64Constant) { |
TRACED_FOREACH(double, value, kFloatValues) { |
const Operator* op = common()->Float64Constant(value); |
EXPECT_PRED2(base::bit_equal_to<double>(), value, OpParameter<double>(op)); |
- EXPECT_EQ(0, OperatorProperties::GetValueInputCount(op)); |
+ EXPECT_EQ(0, op->ValueInputCount()); |
EXPECT_EQ(0, OperatorProperties::GetTotalInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); |
- EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); |
+ EXPECT_EQ(0, op->ControlOutputCount()); |
+ EXPECT_EQ(0, op->EffectOutputCount()); |
+ EXPECT_EQ(1, op->ValueOutputCount()); |
} |
TRACED_FOREACH(double, v1, kFloatValues) { |
TRACED_FOREACH(double, v2, kFloatValues) { |
@@ -250,11 +246,11 @@ TEST_F(CommonOperatorTest, NumberConstant) { |
TRACED_FOREACH(double, value, kFloatValues) { |
const Operator* op = common()->NumberConstant(value); |
EXPECT_PRED2(base::bit_equal_to<double>(), value, OpParameter<double>(op)); |
- EXPECT_EQ(0, OperatorProperties::GetValueInputCount(op)); |
+ EXPECT_EQ(0, op->ValueInputCount()); |
EXPECT_EQ(0, OperatorProperties::GetTotalInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); |
- EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); |
+ EXPECT_EQ(0, op->ControlOutputCount()); |
+ EXPECT_EQ(0, op->EffectOutputCount()); |
+ EXPECT_EQ(1, op->ValueOutputCount()); |
} |
TRACED_FOREACH(double, v1, kFloatValues) { |
TRACED_FOREACH(double, v2, kFloatValues) { |
@@ -270,11 +266,11 @@ TEST_F(CommonOperatorTest, NumberConstant) { |
TEST_F(CommonOperatorTest, ValueEffect) { |
TRACED_FOREACH(int, arguments, kArguments) { |
const Operator* op = common()->ValueEffect(arguments); |
- EXPECT_EQ(arguments, OperatorProperties::GetValueInputCount(op)); |
+ EXPECT_EQ(arguments, op->ValueInputCount()); |
EXPECT_EQ(arguments, OperatorProperties::GetTotalInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); |
- EXPECT_EQ(1, OperatorProperties::GetEffectOutputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetValueOutputCount(op)); |
+ EXPECT_EQ(0, op->ControlOutputCount()); |
+ EXPECT_EQ(1, op->EffectOutputCount()); |
+ EXPECT_EQ(0, op->ValueOutputCount()); |
} |
} |
@@ -282,12 +278,12 @@ TEST_F(CommonOperatorTest, ValueEffect) { |
TEST_F(CommonOperatorTest, Finish) { |
TRACED_FOREACH(int, arguments, kArguments) { |
const Operator* op = common()->Finish(arguments); |
- EXPECT_EQ(1, OperatorProperties::GetValueInputCount(op)); |
- EXPECT_EQ(arguments, OperatorProperties::GetEffectInputCount(op)); |
+ EXPECT_EQ(1, op->ValueInputCount()); |
+ EXPECT_EQ(arguments, op->EffectInputCount()); |
EXPECT_EQ(arguments + 1, OperatorProperties::GetTotalInputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetControlOutputCount(op)); |
- EXPECT_EQ(0, OperatorProperties::GetEffectOutputCount(op)); |
- EXPECT_EQ(1, OperatorProperties::GetValueOutputCount(op)); |
+ EXPECT_EQ(0, op->ControlOutputCount()); |
+ EXPECT_EQ(0, op->EffectOutputCount()); |
+ EXPECT_EQ(1, op->ValueOutputCount()); |
} |
} |