Chromium Code Reviews| 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 60% |
| 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..2e4bdcb56e532c1c13fc734bb03e3d2bb24ae6be 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 |
|
Cutch
2016/06/16 21:38:22
here too
cbernaschina
2016/06/16 21:50:21
Done.
|
| +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); |