Weaken stack-trace based tests to allow auto-roll of new engine which will change the format (#51047)
Follow-up PR will restore those tests with new expectations: https://github.com/flutter/flutter/pull/50760
This commit is contained in:
parent
d8a2169741
commit
17de0c5319
@ -81,11 +81,6 @@ Future<void> main() async {
|
||||
r'#2 getSampleStack \([^)]+flutter/test/foundation/error_reporting_test\.dart:[0-9]+:[0-9]+\)\n'
|
||||
r'#3 main \([^)]+flutter/test/foundation/error_reporting_test\.dart:[0-9]+:[0-9]+\)\n'
|
||||
r'(.+\n)+' // TODO(ianh): when fixing #4021, also filter out frames from the test infrastructure below the first call to our main()
|
||||
r'\(elided [0-9]+ frames from class _RawReceivePortImpl and dart:async\)\n'
|
||||
r'\n'
|
||||
r'line 1 of extra information\n'
|
||||
r'line 2 of extra information\n'
|
||||
r'════════════════════════════════════════════════════════════════════════════════════════════════════$',
|
||||
));
|
||||
console.clear();
|
||||
FlutterError.dumpErrorToConsole(FlutterErrorDetails(
|
||||
@ -153,11 +148,6 @@ Future<void> main() async {
|
||||
r'#2 getSampleStack \([^)]+flutter/test/foundation/error_reporting_test\.dart:[0-9]+:[0-9]+\)\n'
|
||||
r'#3 main \([^)]+flutter/test/foundation/error_reporting_test\.dart:[0-9]+:[0-9]+\)\n'
|
||||
r'(.+\n)+' // TODO(ianh): when fixing #4021, also filter out frames from the test infrastructure below the first call to our main()
|
||||
r'\(elided [0-9]+ frames from class _RawReceivePortImpl and dart:async\)\n'
|
||||
r'\n'
|
||||
r'line 1 of extra information\n'
|
||||
r'line 2 of extra information\n'
|
||||
r'════════════════════════════════════════════════════════════════════════════════════════════════════$',
|
||||
));
|
||||
console.clear();
|
||||
FlutterError.dumpErrorToConsole(FlutterErrorDetails(
|
||||
|
@ -16,13 +16,11 @@ void main() {
|
||||
expect(filtered[0], matches(r'^#0 +main\.<anonymous closure> \(.*stack_trace_test\.dart:[0-9]+:[0-9]+\)$'));
|
||||
expect(filtered[1], matches(r'^#1 +Declarer\.test\.<anonymous closure>.<anonymous closure>.<anonymous closure> \(package:test_api/.+:[0-9]+:[0-9]+\)$'));
|
||||
expect(filtered[2], equals('<asynchronous suspension>'));
|
||||
expect(filtered.last, matches(r'^\(elided [1-9][0-9]+ frames from class _RawReceivePortImpl, class _Timer, dart:async(, dart:async-patch,)? and package:stack_trace\)$'));
|
||||
});
|
||||
|
||||
test('FlutterError.defaultStackFilter (async test body)', () async {
|
||||
final List<String> filtered = FlutterError.defaultStackFilter(StackTrace.current.toString().trimRight().split('\n')).toList();
|
||||
expect(filtered.length, greaterThanOrEqualTo(3));
|
||||
expect(filtered[0], matches(r'^#0 +main\.<anonymous closure> \(.*stack_trace_test\.dart:[0-9]+:[0-9]+\)$'));
|
||||
expect(filtered.last, matches(r'^\(elided [1-9][0-9]+ frames from class _RawReceivePortImpl, class _Timer, dart:async(, dart:async-patch,)? and package:stack_trace\)$'));
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user