Flutter Engine
The Flutter Engine
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 1141 of file renderer_unittests.cc.

Constructor & Destructor Documentation

◆ CompareFunctionUIData()

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

Definition at line 1143 of file renderer_unittests.cc.

1143 {
1144 labels_.push_back("Never");
1145 functions_.push_back(CompareFunction::kNever);
1146 labels_.push_back("Always");
1147 functions_.push_back(CompareFunction::kAlways);
1148 labels_.push_back("Less");
1149 functions_.push_back(CompareFunction::kLess);
1150 labels_.push_back("Equal");
1151 functions_.push_back(CompareFunction::kEqual);
1152 labels_.push_back("LessEqual");
1153 functions_.push_back(CompareFunction::kLessEqual);
1154 labels_.push_back("Greater");
1155 functions_.push_back(CompareFunction::kGreater);
1156 labels_.push_back("NotEqual");
1157 functions_.push_back(CompareFunction::kNotEqual);
1158 labels_.push_back("GreaterEqual");
1159 functions_.push_back(CompareFunction::kGreaterEqual);
1160 assert(labels_.size() == functions_.size());
1161 }
@ 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 1177 of file renderer_unittests.cc.

1177{ return functions_[index]; }

◆ IndexOf()

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

Definition at line 1167 of file renderer_unittests.cc.

1167 {
1168 for (size_t i = 0; i < functions_.size(); i++) {
1169 if (functions_[i] == func) {
1170 return i;
1171 }
1172 }
1174 return -1;
1175 }
#define FML_UNREACHABLE()
Definition: logging.h:109

◆ labels()

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

Definition at line 1163 of file renderer_unittests.cc.

1163{ return &labels_[0]; }

◆ size()

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

Definition at line 1165 of file renderer_unittests.cc.

1165{ return labels_.size(); }

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