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

Constructor & Destructor Documentation

◆ CompareFunctionUIData()

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

Definition at line 1067 of file renderer_unittests.cc.

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

Member Function Documentation

◆ FunctionOf()

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

Definition at line 1101 of file renderer_unittests.cc.

1101{ return functions_[index]; }

◆ IndexOf()

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

Definition at line 1091 of file renderer_unittests.cc.

1091 {
1092 for (size_t i = 0; i < functions_.size(); i++) {
1093 if (functions_[i] == func) {
1094 return i;
1095 }
1096 }
1098 return -1;
1099 }
#define FML_UNREACHABLE()
Definition logging.h:109

◆ labels()

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

Definition at line 1087 of file renderer_unittests.cc.

1087{ return &labels_[0]; }

◆ size()

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

Definition at line 1089 of file renderer_unittests.cc.

1089{ return labels_.size(); }

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