EnhancedLocalFileComparator class
- Inheritance
-
- Object
- GoldenFileComparator
- LocalFileComparator
- EnhancedLocalFileComparator
Constructors
- EnhancedLocalFileComparator(Uri testFile, {required bool captureFailure})
- EnhancedLocalFileComparator.configFromCurrent({bool captureFailure = false})
-
factory
Properties
- basedir → Uri
-
The directory in which the test was loaded.
finalinherited
- basedirPath → String
-
no setter
- captureFailure → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastFailure → GoldenFailureInfo?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
compare(
Uint8List imageBytesBeforeCrop, Uri golden) → Future< bool> -
Compares the pixels of decoded png
imageBytes
against the golden file identified bygolden
.override -
generateFailureOutput(
ComparisonResult result, Uri golden, Uri basedir, {String key = ''}) → Future< String> -
Writes out diffs from the ComparisonResult of a golden file test.
override
-
getFailureFile(
String failure, Uri golden, Uri basedir) → File -
Returns the appropriate file for a given diff from a ComparisonResult.
inherited
-
getGoldenBytes(
Uri golden) → Future< List< int> > -
Returns the bytes of the given
golden
file.inherited -
getTestUri(
Uri key, int? version) → Uri -
Returns a new golden file Uri to incorporate any
version
number with thekey
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Uri golden, Uint8List imageBytesBeforeCrop) → Future< void> -
Updates the golden file identified by
golden
withimageBytes
.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → EnhancedLocalFileComparator
-
no setter
Static Methods
-
createUri(
String path, GoldenConfig? config) → Uri -
myCompareLists(
List< int> test, List<int> master) → Future<MyComparisonResult>