Flutter Engine
 
Loading...
Searching...
No Matches
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 1169 of file renderer_unittests.cc.

Constructor & Destructor Documentation

◆ CompareFunctionUIData()

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

Definition at line 1171 of file renderer_unittests.cc.

1171 {
1172 labels_.push_back("Never");
1173 functions_.push_back(CompareFunction::kNever);
1174 labels_.push_back("Always");
1175 functions_.push_back(CompareFunction::kAlways);
1176 labels_.push_back("Less");
1177 functions_.push_back(CompareFunction::kLess);
1178 labels_.push_back("Equal");
1179 functions_.push_back(CompareFunction::kEqual);
1180 labels_.push_back("LessEqual");
1181 functions_.push_back(CompareFunction::kLessEqual);
1182 labels_.push_back("Greater");
1183 functions_.push_back(CompareFunction::kGreater);
1184 labels_.push_back("NotEqual");
1185 functions_.push_back(CompareFunction::kNotEqual);
1186 labels_.push_back("GreaterEqual");
1187 functions_.push_back(CompareFunction::kGreaterEqual);
1188 assert(labels_.size() == functions_.size());
1189 }
@ kEqual
Comparison test passes if new_value == current_value.
@ kLessEqual
Comparison test passes if new_value <= current_value.
@ kGreaterEqual
Comparison test passes if new_value >= current_value.
@ kAlways
Comparison test passes always passes.
@ kLess
Comparison test passes if new_value < current_value.
@ kGreater
Comparison test passes if new_value > current_value.
@ kNotEqual
Comparison test passes if new_value != current_value.
@ kNever
Comparison test never passes.

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

1205{ return functions_[index]; }

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

◆ IndexOf()

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

Definition at line 1195 of file renderer_unittests.cc.

1195 {
1196 for (size_t i = 0; i < functions_.size(); i++) {
1197 if (functions_[i] == func) {
1198 return i;
1199 }
1200 }
1202 return -1;
1203 }
#define FML_UNREACHABLE()
Definition logging.h:128

References FML_UNREACHABLE, and i.

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

◆ labels()

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

Definition at line 1191 of file renderer_unittests.cc.

1191{ return &labels_[0]; }

◆ size()

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

Definition at line 1193 of file renderer_unittests.cc.

1193{ return labels_.size(); }

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