Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(716)

Unified Diff: runtime/observatory/tests/service/get_isolate_after_stack_overflow_error_test.dart

Issue 2073893002: Removed all analyzer issues from tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698