TrivialComparator class
Placeholder comparator that is set as the value of goldenFileComparator when the initialization that happens in the test bootstrap either has not yet happened or has been bypassed.
The test bootstrap file that gets generated by the Flutter tool when the
user runs flutter test
is expected to set goldenFileComparator to
a comparator that resolves golden file references relative to the test
directory. From there, the caller may choose to override the comparator by
setting it to another value during test initialization. The only case
where we expect it to remain uninitialized is when the user runs a test
via flutter run
. In this case, the compare method will just print a
message that it would have otherwise run a real comparison, and it will
return trivial success.
This class can't be constructed. It represents the default value of goldenFileComparator.
- Implemented types
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
compare(
Uint8List imageBytes, Uri golden) → Future< bool> -
Compares
imageBytes
against the golden file identified bygolden
. [...]override -
update(
Uri golden, Uint8List imageBytes) → Future< void> -
Updates the golden file identified by
golden
withimageBytes
. [...]override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited