Fix tests to pass internally (#8683)
This commit is contained in:
parent
edbfb17b62
commit
f613fef23b
@ -66,7 +66,7 @@ Future<Null> main() async {
|
|||||||
'^══╡ EXCEPTION CAUGHT BY ERROR HANDLING TEST ╞═══════════════════════════════════════════════════════\n'
|
'^══╡ EXCEPTION CAUGHT BY ERROR HANDLING TEST ╞═══════════════════════════════════════════════════════\n'
|
||||||
'The following assertion was thrown testing the error handling logic:\n'
|
'The following assertion was thrown testing the error handling logic:\n'
|
||||||
'Message goes here\\.\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'
|
'\n'
|
||||||
'Either the assertion indicates an error in the framework itself, or we should provide substantially '
|
'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'
|
'more information in this error message to help you determine and fix the underlying cause\\.\n'
|
||||||
@ -74,10 +74,10 @@ Future<Null> main() async {
|
|||||||
' https://github\\.com/flutter/flutter/issues/new\n'
|
' https://github\\.com/flutter/flutter/issues/new\n'
|
||||||
'\n'
|
'\n'
|
||||||
'When the exception was thrown, this was the stack:\n'
|
'When the exception was thrown, this was the stack:\n'
|
||||||
'#0 getSampleStack\\.<anonymous closure> \\([^)]+packages/flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n'
|
'#0 getSampleStack\\.<anonymous closure> \\([^)]+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'
|
'#2 getSampleStack \\([^)]+flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n'
|
||||||
'<asynchronous suspension>\n' // TODO(ianh): https://github.com/flutter/flutter/issues/4021
|
'<asynchronous suspension>\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()
|
'(.+\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'
|
'\\(elided [0-9]+ frames from package dart:async\\)\n'
|
||||||
'\n'
|
'\n'
|
||||||
@ -107,7 +107,7 @@ Future<Null> 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 '
|
'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'
|
'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'
|
'\n'
|
||||||
'Either the assertion indicates an error in the framework itself, or we should provide substantially '
|
'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'
|
'more information in this error message to help you determine and fix the underlying cause\\.\n'
|
||||||
@ -147,7 +147,7 @@ Future<Null> main() async {
|
|||||||
expect(console.join('\n'), matches(new RegExp(
|
expect(console.join('\n'), matches(new RegExp(
|
||||||
'^══╡ EXCEPTION CAUGHT BY ERROR HANDLING TEST ╞═══════════════════════════════════════════════════════\n'
|
'^══╡ EXCEPTION CAUGHT BY ERROR HANDLING TEST ╞═══════════════════════════════════════════════════════\n'
|
||||||
'The following assertion was thrown testing the error handling logic:\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'
|
'\n'
|
||||||
'Either the assertion indicates an error in the framework itself, or we should provide substantially '
|
'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'
|
'more information in this error message to help you determine and fix the underlying cause\\.\n'
|
||||||
@ -155,10 +155,10 @@ Future<Null> main() async {
|
|||||||
' https://github\\.com/flutter/flutter/issues/new\n'
|
' https://github\\.com/flutter/flutter/issues/new\n'
|
||||||
'\n'
|
'\n'
|
||||||
'When the exception was thrown, this was the stack:\n'
|
'When the exception was thrown, this was the stack:\n'
|
||||||
'#0 getSampleStack\\.<anonymous closure> \\([^)]+packages/flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n'
|
'#0 getSampleStack\\.<anonymous closure> \\([^)]+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'
|
'#2 getSampleStack \\([^)]+flutter/test/foundation/error_reporting_test\\.dart:[0-9]+:[0-9]+\\)\n'
|
||||||
'<asynchronous suspension>\n' // TODO(ianh): https://github.com/flutter/flutter/issues/4021
|
'<asynchronous suspension>\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()
|
'(.+\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'
|
'\\(elided [0-9]+ frames from package dart:async\\)\n'
|
||||||
'\n'
|
'\n'
|
||||||
@ -170,7 +170,7 @@ Future<Null> main() async {
|
|||||||
FlutterError.dumpErrorToConsole(new FlutterErrorDetails(
|
FlutterError.dumpErrorToConsole(new FlutterErrorDetails(
|
||||||
exception: getAssertionErrorWithoutMessage(),
|
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();
|
console.clear();
|
||||||
FlutterError.resetErrorCount();
|
FlutterError.resetErrorCount();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user