| Flutter Impeller |

Public Member Functions | List of all members
impeller::testing::CompareFunctionUIData Class Reference

## Public Member Functions
| CompareFunctionUIData ()
const char *const * | labels () const
int | size () const
int | IndexOf (CompareFunction func) const
CompareFunction | FunctionOf (int index) const

## Detailed Description

Definition at line 1141 of file renderer_unittests.cc.

## Constructor & Destructor Documentation

## ◆ CompareFunctionUIData()

impeller::testing::CompareFunctionUIData::CompareFunctionUIData | ( |  | ) |
| inline

Definition at line 1143 of file renderer_unittests.cc.

1143 {
1144 labels_.push_back("Never");
1145 functions_.push_back(CompareFunction::kNever);
1146 labels_.push_back("Always");
1147 functions_.push_back(CompareFunction::kAlways);
1148 labels_.push_back("Less");
1149 functions_.push_back(CompareFunction::kLess);
1150 labels_.push_back("Equal");
1151 functions_.push_back(CompareFunction::kEqual);
1152 labels_.push_back("LessEqual");
1153 functions_.push_back(CompareFunction::kLessEqual);
1154 labels_.push_back("Greater");
1155 functions_.push_back(CompareFunction::kGreater);
1156 labels_.push_back("NotEqual");
1157 functions_.push_back(CompareFunction::kNotEqual);
1158 labels_.push_back("GreaterEqual");
1159 functions_.push_back(CompareFunction::kGreaterEqual);
1160 assert(labels_.size() == functions_.size());
1161 }

References impeller::kAlways, impeller::kEqual, impeller::kGreater, impeller::kGreaterEqual, impeller::kLess, impeller::kLessEqual, impeller::kNever, and impeller::kNotEqual.

## Member Function Documentation

## ◆ FunctionOf()

CompareFunction impeller::testing::CompareFunctionUIData::FunctionOf | ( | int | index | ) | const
| inline

Definition at line 1177 of file renderer_unittests.cc.

1177 { return functions_[index]; }

Referenced by impeller::testing::TEST_P().

## ◆ IndexOf()

int impeller::testing::CompareFunctionUIData::IndexOf | ( | CompareFunction | func | ) | const
| inline

Definition at line 1167 of file renderer_unittests.cc.

1167 {
1168 for (size_t i = 0; i < functions_.size(); i++) {
1169 if (functions_[i] == func) {
1170 return i;
1171 }
1172 }
1173 FML_UNREACHABLE();
1174 return -1;
1175 }

Referenced by impeller::testing::TEST_P().

## ◆ labels()

const char* const* impeller::testing::CompareFunctionUIData::labels | ( |  | ) | const
| inline

Definition at line 1163 of file renderer_unittests.cc.

1163 { return &labels_[0]; }

## ◆ size()

int impeller::testing::CompareFunctionUIData::size | ( |  | ) | const
| inline

Definition at line 1165 of file renderer_unittests.cc.

1165 { return labels_.size(); }

The documentation for this class was generated from the following file:

- impeller/renderer/renderer_unittests.cc

impeller::CompareFunction::kGreater
@ kGreater
Comparison test passes if new_value > current_value.
impeller::CompareFunction::kEqual
@ kEqual
Comparison test passes if new_value == current_value.
impeller::CompareFunction::kGreaterEqual
@ kGreaterEqual
Comparison test passes if new_value >= current_value.
impeller::CompareFunction::kLessEqual
@ kLessEqual
Comparison test passes if new_value <= current_value.
impeller::CompareFunction::kAlways
@ kAlways
Comparison test passes always passes.
impeller::CompareFunction::kNever
@ kNever
Comparison test never passes.
impeller::CompareFunction::kNotEqual
@ kNotEqual
Comparison test passes if new_value != current_value.
impeller::CompareFunction::kLess
@ kLess
Comparison test passes if new_value < current_value.