Allow all tests to run with --update-goldens. (#31562)
Previously benchmark_test.dart would break if run with --update-goldens. Now the entire test suite can be run with --update-goldens.
This commit is contained in:
@@ -1106,12 +1106,6 @@ enum LiveTestWidgetsFlutterBindingFramePolicy {
|
||||
/// doesn't trigger a paint, since then you could not see anything
|
||||
/// anyway.)
|
||||
class LiveTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
|
||||
@override
|
||||
void initInstances() {
|
||||
super.initInstances();
|
||||
assert(!autoUpdateGoldenFiles);
|
||||
}
|
||||
|
||||
@override
|
||||
bool get inTest => _inTest;
|
||||
bool _inTest = false;
|
||||
|
||||
@@ -124,7 +124,6 @@ class TrivialComparator implements GoldenFileComparator {
|
||||
|
||||
@override
|
||||
Future<void> update(Uri golden, Uint8List imageBytes) {
|
||||
// [autoUpdateGoldenFiles] should never be set in a live widget binding.
|
||||
throw StateError('goldenFileComparator has not been initialized');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user