| Index: tests/language/vm/precompiled_static_initializer_test.dart
|
| diff --git a/tests/lib/mirrors/null2_test.dart b/tests/language/vm/precompiled_static_initializer_test.dart
|
| similarity index 54%
|
| copy from tests/lib/mirrors/null2_test.dart
|
| copy to tests/language/vm/precompiled_static_initializer_test.dart
|
| index 4c5590d398f9ad7f7d251438ffbb1e3f2104c6cc..36067a2a2f0a4f86522cfa717cfd5f3aa964137f 100644
|
| --- a/tests/lib/mirrors/null2_test.dart
|
| +++ b/tests/language/vm/precompiled_static_initializer_test.dart
|
| @@ -1,16 +1,19 @@
|
| // 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.
|
| +// Test optimizations with static fields with precompilation.
|
| +// VMOptions=--noopt --inlining-hotness=0
|
|
|
| -library test.null_test;
|
| +import 'package:expect/expect.dart';
|
|
|
| -import 'dart:mirrors';
|
| +init() => 123;
|
|
|
| -import 'package:expect/expect.dart';
|
| +final a = init();
|
|
|
| main() {
|
| - InstanceMirror nullMirror = reflect(null);
|
| - for (int i = 0; i < 10; i++) {
|
| - Expect.isTrue(nullMirror.getField(#hashCode).reflectee is int);
|
| + var s = 0;
|
| + for (var i = 0; i < 10; i++) {
|
| + s += a;
|
| }
|
| + Expect.equals(10 * 123, s);
|
| }
|
|
|