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

Constructor & Destructor Documentation

◆ CompareFunctionUIData()

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

Definition at line 1063 of file renderer_unittests.cc.

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

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

1097 { return functions_[index]; }

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

◆ IndexOf()

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

Definition at line 1087 of file renderer_unittests.cc.

1087  {
1088  for (size_t i = 0; i < functions_.size(); i++) {
1089  if (functions_[i] == func) {
1090  return i;
1091  }
1092  }
1093  FML_UNREACHABLE();
1094  return -1;
1095  }

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

◆ labels()

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

Definition at line 1083 of file renderer_unittests.cc.

1083 { return &labels_[0]; }

◆ size()

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

Definition at line 1085 of file renderer_unittests.cc.

1085 { 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::kNotEqual
@ kNotEqual
Comparison test passes if new_value != current_value.
impeller::CompareFunction::kNever
@ kNever
Comparison test never passes.
impeller::CompareFunction::kLess
@ kLess
Comparison test passes if new_value < current_value.
impeller::CompareFunction::kGreaterEqual
@ kGreaterEqual
Comparison test passes if new_value >= current_value.
impeller::CompareFunction::kAlways
@ kAlways
Comparison test passes always passes.
impeller::CompareFunction::kEqual
@ kEqual
Comparison test passes if new_value == current_value.
impeller::CompareFunction::kLessEqual
@ kLessEqual
Comparison test passes if new_value <= current_value.