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:
sjindel-google
2019-04-25 17:13:26 +02:00
committed by GitHub
parent 482078387e
commit e84b4c47b8
2 changed files with 0 additions and 7 deletions

View File

@@ -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;

View File

@@ -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');
}
}