diff --git a/packages/flutter/test/foundation/error_reporting_test.dart b/packages/flutter/test/foundation/error_reporting_test.dart index c5373bb333..028619ba45 100644 --- a/packages/flutter/test/foundation/error_reporting_test.dart +++ b/packages/flutter/test/foundation/error_reporting_test.dart @@ -66,7 +66,7 @@ Future main() async { '^══╡ EXCEPTION CAUGHT BY ERROR HANDLING TEST ╞═══════════════════════════════════════════════════════\n' 'The following assertion was thrown testing the error handling logic:\n' 'Message goes here\\.\n' - '\'[^\']+packages/flutter/test/foundation/error_reporting_test\\.dart\': Failed assertion: line [0-9]+ pos [0-9]+: \'false\'\n' + '\'[^\']+flutter/test/foundation/error_reporting_test\\.dart\': Failed assertion: line [0-9]+ pos [0-9]+: \'false\'\n' '\n' 'Either the assertion indicates an error in the framework itself, or we should provide substantially ' 'more information in this error message to help you determine and fix the underlying cause\\.\n' @@ -74,10 +74,10 @@ Future main() async { ' https://github\\.com/flutter/flutter/issues/new\n' '\n' 'When the exception was thrown, this was the stack:\n' - '#0 getSampleStack\\. \\([^)]+packages/flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' - '#2 getSampleStack \\([^)]+packages/flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' + '#0 getSampleStack\\. \\([^)]+flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' + '#2 getSampleStack \\([^)]+flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' '\n' // TODO(ianh): https://github.com/flutter/flutter/issues/4021 - '#3 main \\([^)]+packages/flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' + '#3 main \\([^)]+flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' '(.+\n)+' // TODO(ianh): when fixing #4021, also filter out frames from the test infrastructure below the first call to our main() '\\(elided [0-9]+ frames from package dart:async\\)\n' '\n' @@ -107,7 +107,7 @@ Future main() async { 'word word word word word word word word word word word word word word word word word word word word ' 'word word word word word word word word word word word word word word word word word word word word ' 'word word word word word word word word word word word word word word word word word word word word\n' - '\'[^\']+packages/flutter/test/foundation/error_reporting_test\\.dart\': Failed assertion: line [0-9]+ pos [0-9]+: \'false\'\n' + '\'[^\']+flutter/test/foundation/error_reporting_test\\.dart\': Failed assertion: line [0-9]+ pos [0-9]+: \'false\'\n' '\n' 'Either the assertion indicates an error in the framework itself, or we should provide substantially ' 'more information in this error message to help you determine and fix the underlying cause\\.\n' @@ -147,7 +147,7 @@ Future main() async { expect(console.join('\n'), matches(new RegExp( '^══╡ EXCEPTION CAUGHT BY ERROR HANDLING TEST ╞═══════════════════════════════════════════════════════\n' 'The following assertion was thrown testing the error handling logic:\n' - '\'[^\']+packages/flutter/test/foundation/error_reporting_test\\.dart\': Failed assertion: line [0-9]+ pos [0-9]+: \'false\': is not true\\.\n' + '\'[^\']+flutter/test/foundation/error_reporting_test\\.dart\': Failed assertion: line [0-9]+ pos [0-9]+: \'false\': is not true\\.\n' '\n' 'Either the assertion indicates an error in the framework itself, or we should provide substantially ' 'more information in this error message to help you determine and fix the underlying cause\\.\n' @@ -155,10 +155,10 @@ Future main() async { ' https://github\\.com/flutter/flutter/issues/new\n' '\n' 'When the exception was thrown, this was the stack:\n' - '#0 getSampleStack\\. \\([^)]+packages/flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' - '#2 getSampleStack \\([^)]+packages/flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' + '#0 getSampleStack\\. \\([^)]+flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' + '#2 getSampleStack \\([^)]+flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' '\n' // TODO(ianh): https://github.com/flutter/flutter/issues/4021 - '#3 main \\([^)]+packages/flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' + '#3 main \\([^)]+flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n' '(.+\n)+' // TODO(ianh): when fixing #4021, also filter out frames from the test infrastructure below the first call to our main() '\\(elided [0-9]+ frames from package dart:async\\)\n' '\n' @@ -170,7 +170,7 @@ Future main() async { FlutterError.dumpErrorToConsole(new FlutterErrorDetails( exception: getAssertionErrorWithoutMessage(), )); - expect(console.join('\n'), matches('Another exception was thrown: \'[^\']+packages/flutter/test/foundation/error_reporting_test\\.dart\': Failed assertion: line [0-9]+ pos [0-9]+: \'false\': is not true\\.')); + expect(console.join('\n'), matches('Another exception was thrown: \'[^\']+flutter/test/foundation/error_reporting_test\\.dart\': Failed assertion: line [0-9]+ pos [0-9]+: \'false\': is not true\\.')); console.clear(); FlutterError.resetErrorCount(); });