This reverts commit cb378edc9e.
This commit is contained in:
@@ -6,8 +6,6 @@ import 'dart:typed_data';
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:test_api/test_api.dart'; // ignore: deprecated_member_use
|
||||
|
||||
import '_goldens_io.dart' if (dart.library.html) '_goldens_web.dart' as _goldens;
|
||||
|
||||
/// Compares image pixels against a golden image file.
|
||||
@@ -270,7 +268,7 @@ class TrivialComparator implements GoldenFileComparator {
|
||||
|
||||
@override
|
||||
Future<bool> compare(Uint8List imageBytes, Uri golden) {
|
||||
markTestSkipped('Golden file comparison requested for "$golden"; skipping...');
|
||||
print('Golden file comparison requested for "$golden"; skipping...');
|
||||
return Future<bool>.value(true);
|
||||
}
|
||||
|
||||
@@ -290,7 +288,7 @@ class _TrivialWebGoldenComparator implements WebGoldenComparator {
|
||||
|
||||
@override
|
||||
Future<bool> compare(double width, double height, Uri golden) {
|
||||
markTestSkipped('Golden comparison requested for "$golden"; skipping...');
|
||||
print('Golden comparison requested for "$golden"; skipping...');
|
||||
return Future<bool>.value(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ Future<void> _runLiveTest(Suite suiteConfig, LiveTest liveTest, _Reporter report
|
||||
Future<void> _runSkippedTest(Suite suiteConfig, Test test, List<Group> parents, _Reporter reporter) async {
|
||||
final LocalTest skipped = LocalTest(test.name, test.metadata, () { }, trace: test.trace);
|
||||
if (skipped.metadata.skipReason != null) {
|
||||
reporter.log('Skip: ${skipped.metadata.skipReason}');
|
||||
print('Skip: ${skipped.metadata.skipReason}');
|
||||
}
|
||||
final LiveTest liveTest = skipped.load(suiteConfig);
|
||||
reporter._onTestStarted(liveTest);
|
||||
@@ -334,7 +334,7 @@ class _Reporter {
|
||||
if (message.type == MessageType.skip) {
|
||||
text = ' $_yellow$text$_noColor';
|
||||
}
|
||||
log(text);
|
||||
print(text);
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -351,8 +351,8 @@ class _Reporter {
|
||||
return;
|
||||
}
|
||||
_progressLine(_description(liveTest), suffix: ' $_bold$_red[E]$_noColor');
|
||||
log(_indent(error.toString()));
|
||||
log(_indent('$stackTrace'));
|
||||
print(_indent(error.toString()));
|
||||
print(_indent('$stackTrace'));
|
||||
}
|
||||
|
||||
/// A callback called when the engine is finished running tests.
|
||||
@@ -421,7 +421,7 @@ class _Reporter {
|
||||
buffer.write(message);
|
||||
buffer.write(_noColor);
|
||||
|
||||
log(buffer.toString());
|
||||
print(buffer.toString());
|
||||
}
|
||||
|
||||
/// Returns a representation of [duration] as `MM:SS`.
|
||||
@@ -442,13 +442,6 @@ class _Reporter {
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/// Print the message to the console.
|
||||
void log(String message) {
|
||||
// We centralize all the prints in this file through this one method so that
|
||||
// in principle we can reroute the output easily should we need to.
|
||||
print(message); // ignore: avoid_print
|
||||
}
|
||||
}
|
||||
|
||||
String _indent(String string, { int? size, String? first }) {
|
||||
|
||||
@@ -416,7 +416,7 @@ Future<void> benchmarkWidgets(
|
||||
assert(() {
|
||||
if (mayRunWithAsserts)
|
||||
return true;
|
||||
debugPrint(kDebugWarning);
|
||||
print(kDebugWarning);
|
||||
return true;
|
||||
}());
|
||||
final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized() as TestWidgetsFlutterBinding;
|
||||
|
||||
Reference in New Issue
Block a user