Flutter Impeller
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 1066 of file renderer_unittests.cc.

Constructor & Destructor Documentation

◆ CompareFunctionUIData()

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

Definition at line 1068 of file renderer_unittests.cc.

1068  {
1069  labels_.push_back("Never");
1070  functions_.push_back(CompareFunction::kNever);
1071  labels_.push_back("Always");
1072  functions_.push_back(CompareFunction::kAlways);
1073  labels_.push_back("Less");
1074  functions_.push_back(CompareFunction::kLess);
1075  labels_.push_back("Equal");
1076  functions_.push_back(CompareFunction::kEqual);
1077  labels_.push_back("LessEqual");
1078  functions_.push_back(CompareFunction::kLessEqual);
1079  labels_.push_back("Greater");
1080  functions_.push_back(CompareFunction::kGreater);
1081  labels_.push_back("NotEqual");
1082  functions_.push_back(CompareFunction::kNotEqual);
1083  labels_.push_back("GreaterEqual");
1084  functions_.push_back(CompareFunction::kGreaterEqual);
1085  assert(labels_.size() == functions_.size());
1086  }

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 1102 of file renderer_unittests.cc.

1102 { return functions_[index]; }

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

◆ IndexOf()

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

Definition at line 1092 of file renderer_unittests.cc.

1092  {
1093  for (size_t i = 0; i < functions_.size(); i++) {
1094  if (functions_[i] == func) {
1095  return i;
1096  }
1097  }
1098  FML_UNREACHABLE();
1099  return -1;
1100  }

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

◆ labels()

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

Definition at line 1088 of file renderer_unittests.cc.

1088 { return &labels_[0]; }

◆ size()

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

Definition at line 1090 of file renderer_unittests.cc.

1090 { return labels_.size(); }

The documentation for this class was generated from the following file:
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.