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

Constructor & Destructor Documentation

◆ CompareFunctionUIData()

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

Definition at line 1070 of file renderer_unittests.cc.

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

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

1104 { return functions_[index]; }

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

◆ IndexOf()

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

Definition at line 1094 of file renderer_unittests.cc.

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

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

◆ labels()

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

Definition at line 1090 of file renderer_unittests.cc.

1090 { return &labels_[0]; }

◆ size()

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

Definition at line 1092 of file renderer_unittests.cc.

1092 { 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.