File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
packages/flutter/test/foundation Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,11 @@ Future<void> main() async {
8181 r'#2 getSampleStack \([^)]+flutter/test/foundation/error_reporting_test\.dart:[0-9]+:[0-9]+\)\n'
8282 r'#3 main \([^)]+flutter/test/foundation/error_reporting_test\.dart:[0-9]+:[0-9]+\)\n'
8383 r'(.+\n)+' // TODO(ianh): when fixing #4021, also filter out frames from the test infrastructure below the first call to our main()
84+ r'\(elided one frame from dart:async\)\n'
85+ r'\n'
86+ r'line 1 of extra information\n'
87+ r'line 2 of extra information\n'
88+ r'════════════════════════════════════════════════════════════════════════════════════════════════════$' ,
8489 ));
8590 console.clear ();
8691 FlutterError .dumpErrorToConsole (FlutterErrorDetails (
@@ -148,6 +153,11 @@ Future<void> main() async {
148153 r'#2 getSampleStack \([^)]+flutter/test/foundation/error_reporting_test\.dart:[0-9]+:[0-9]+\)\n'
149154 r'#3 main \([^)]+flutter/test/foundation/error_reporting_test\.dart:[0-9]+:[0-9]+\)\n'
150155 r'(.+\n)+' // TODO(ianh): when fixing #4021, also filter out frames from the test infrastructure below the first call to our main()
156+ r'\(elided one frame from dart:async\)\n'
157+ r'\n'
158+ r'line 1 of extra information\n'
159+ r'line 2 of extra information\n'
160+ r'════════════════════════════════════════════════════════════════════════════════════════════════════$' ,
151161 ));
152162 console.clear ();
153163 FlutterError .dumpErrorToConsole (FlutterErrorDetails (
Original file line number Diff line number Diff line change @@ -16,11 +16,13 @@ void main() {
1616 expect (filtered[0 ], matches (r'^#0 +main\.<anonymous closure> \(.*stack_trace_test\.dart:[0-9]+:[0-9]+\)$' ));
1717 expect (filtered[1 ], matches (r'^#1 +Declarer\.test\.<anonymous closure>.<anonymous closure>.<anonymous closure> \(package:test_api/.+:[0-9]+:[0-9]+\)$' ));
1818 expect (filtered[2 ], equals ('<asynchronous suspension>' ));
19+ expect (filtered.last, matches (r'^\(elided one frame from package:stack_trace\)$' ));
1920 });
2021
2122 test ('FlutterError.defaultStackFilter (async test body)' , () async {
2223 final List <String > filtered = FlutterError .defaultStackFilter (StackTrace .current.toString ().trimRight ().split ('\n ' )).toList ();
2324 expect (filtered.length, greaterThanOrEqualTo (3 ));
2425 expect (filtered[0 ], matches (r'^#0 +main\.<anonymous closure> \(.*stack_trace_test\.dart:[0-9]+:[0-9]+\)$' ));
26+ expect (filtered.last, matches (r'^\(elided one frame from package:stack_trace\)$' ));
2527 });
2628}
You can’t perform that action at this time.
0 commit comments