Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
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 1129 of file renderer_unittests.cc.

Constructor & Destructor Documentation

◆ CompareFunctionUIData()

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

Definition at line 1131 of file renderer_unittests.cc.

1131 {
1132 labels_.push_back("Never");
1133 functions_.push_back(CompareFunction::kNever);
1134 labels_.push_back("Always");
1135 functions_.push_back(CompareFunction::kAlways);
1136 labels_.push_back("Less");
1137 functions_.push_back(CompareFunction::kLess);
1138 labels_.push_back("Equal");
1139 functions_.push_back(CompareFunction::kEqual);
1140 labels_.push_back("LessEqual");
1141 functions_.push_back(CompareFunction::kLessEqual);
1142 labels_.push_back("Greater");
1143 functions_.push_back(CompareFunction::kGreater);
1144 labels_.push_back("NotEqual");
1145 functions_.push_back(CompareFunction::kNotEqual);
1146 labels_.push_back("GreaterEqual");
1147 functions_.push_back(CompareFunction::kGreaterEqual);
1148 assert(labels_.size() == functions_.size());
1149 }
@ 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 1165 of file renderer_unittests.cc.

1165{ return functions_[index]; }

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

◆ IndexOf()

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

Definition at line 1155 of file renderer_unittests.cc.

1155 {
1156 for (size_t i = 0; i < functions_.size(); i++) {
1157 if (functions_[i] == func) {
1158 return i;
1159 }
1160 }
1162 return -1;
1163 }
#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 1151 of file renderer_unittests.cc.

1151{ return &labels_[0]; }

◆ size()

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

Definition at line 1153 of file renderer_unittests.cc.

1153{ return labels_.size(); }

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