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

Unified Diff: tests/language/code_motion_crash_test.dart

Issue 3002573002: Migrating another batch of tests to dart 2. (Closed)
Patch Set: Removed library closure_type_test from test_file Created 3 years, 4 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
« no previous file with comments | « tests/language/code_after_try_is_executed_test.dart ('k') | tests/language/comparison_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/code_motion_crash_test.dart
diff --git a/tests/language/code_motion_crash_test.dart b/tests/language/code_motion_crash_test.dart
deleted file mode 100644
index f0d30b8d2ad4427b9850807088e7b38b94c6e735..0000000000000000000000000000000000000000
--- a/tests/language/code_motion_crash_test.dart
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Regression test for dart2js that used to crash during the
-// [SsaCodeMotion] phase on this code.
-
-class A {
- final finalField;
- var field = 2;
- foo() {
- new A().field = 42;
- }
-
- A._() : finalField = 42;
- A() : finalField = [new A._(), new B(), new Object()][1];
-}
-
-class B {
- foo() {}
- bar() {}
-}
-
-main() {
- var a = new A();
- // Create a new block for SsaCodeMotion: the phase will want to move
- // field access on [a] to this block.
- if (true) {
- var b = a.finalField;
- var d = a.field;
- b.bar();
-
- // [c] gets GVN'ed with [b]. As a consequence, the type propagator
- // that runs after GVN sees that [c] can only be a [B] because of
- // the call to [bar].
- var c = a.finalField;
- c.foo();
-
- // [e] does not get GVN'ed because the GVN phase sees [c.foo()] as
- // having side effects.
- var e = a.field;
- if (d + e != 4) throw 'Test failed';
- }
-}
« no previous file with comments | « tests/language/code_after_try_is_executed_test.dart ('k') | tests/language/comparison_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698