| Index: runtime/observatory/tests/service/get_isolate_after_stack_overflow_error_test.dart
|
| diff --git a/runtime/observatory/tests/service/get_isolate_after_async_error_test.dart b/runtime/observatory/tests/service/get_isolate_after_stack_overflow_error_test.dart
|
| similarity index 58%
|
| copy from runtime/observatory/tests/service/get_isolate_after_async_error_test.dart
|
| copy to runtime/observatory/tests/service/get_isolate_after_stack_overflow_error_test.dart
|
| index a0c531d16e0c5114dc22cb86424b2fe75116ed06..0223218d210765602f7245cef3f60584ca5a2694 100644
|
| --- a/runtime/observatory/tests/service/get_isolate_after_async_error_test.dart
|
| +++ b/runtime/observatory/tests/service/get_isolate_after_stack_overflow_error_test.dart
|
| @@ -8,8 +8,13 @@ import 'package:unittest/unittest.dart';
|
| import 'test_helper.dart';
|
| import 'service_test_common.dart';
|
|
|
| -doThrow() async {
|
| - throw "oh no"; // Line 13.
|
| +// Non tailable recursive function that should trigger a Stack Overflow.
|
| +num factorialGrowth([num n = 1]) {
|
| + return factorialGrowth(n + 1) * n;
|
| +}
|
| +
|
| +void nonTailableRecursion() {
|
| + factorialGrowth();
|
| }
|
|
|
| var tests = [
|
| @@ -18,11 +23,11 @@ var tests = [
|
| (Isolate isolate) async {
|
| await isolate.reload();
|
| expect(isolate.error, isNotNull);
|
| - expect(isolate.error.message.contains('oh no'), isTrue);
|
| + expect(isolate.error.message.contains('Stack Overflow'), isTrue);
|
| }
|
| ];
|
|
|
| main(args) async => runIsolateTests(args,
|
| - tests,
|
| - pause_on_exit: true,
|
| - testeeConcurrent: doThrow);
|
| + tests,
|
| + pause_on_exit: true,
|
| + testeeConcurrent: nonTailableRecursion);
|
|
|