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

Constructor & Destructor Documentation

◆ CompareFunctionUIData()

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

Definition at line 1119 of file renderer_unittests.cc.

1119 {
1120 labels_.push_back("Never");
1121 functions_.push_back(CompareFunction::kNever);
1122 labels_.push_back("Always");
1123 functions_.push_back(CompareFunction::kAlways);
1124 labels_.push_back("Less");
1125 functions_.push_back(CompareFunction::kLess);
1126 labels_.push_back("Equal");
1127 functions_.push_back(CompareFunction::kEqual);
1128 labels_.push_back("LessEqual");
1129 functions_.push_back(CompareFunction::kLessEqual);
1130 labels_.push_back("Greater");
1131 functions_.push_back(CompareFunction::kGreater);
1132 labels_.push_back("NotEqual");
1133 functions_.push_back(CompareFunction::kNotEqual);
1134 labels_.push_back("GreaterEqual");
1135 functions_.push_back(CompareFunction::kGreaterEqual);
1136 assert(labels_.size() == functions_.size());
1137 }
@ 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 1153 of file renderer_unittests.cc.

1153{ return functions_[index]; }

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

◆ IndexOf()

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

Definition at line 1143 of file renderer_unittests.cc.

1143 {
1144 for (size_t i = 0; i < functions_.size(); i++) {
1145 if (functions_[i] == func) {
1146 return i;
1147 }
1148 }
1150 return -1;
1151 }
#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 1139 of file renderer_unittests.cc.

1139{ return &labels_[0]; }

◆ size()

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

Definition at line 1141 of file renderer_unittests.cc.

1141{ return labels_.size(); }

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