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

Side by Side Diff: tests/compiler/dart2js/mirror_private_name_inheritance_test.dart

Issue 2944843002: All strong mode cleaning of dart2js. (Closed)
Patch Set: More issues discovered during testing. Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Test that final fields in @MirrorsUsed are still inferred. 5 // Test that final fields in @MirrorsUsed are still inferred.
6 6
7 import 'package:expect/expect.dart'; 7 import 'package:expect/expect.dart';
8 import "package:async_helper/async_helper.dart"; 8 import "package:async_helper/async_helper.dart";
9 import 'memory_compiler.dart' show runCompiler; 9 import 'memory_compiler.dart' show runCompiler;
10 import 'compiler_helper.dart' show findElement; 10 import 'compiler_helper.dart' show findElement;
(...skipping 22 matching lines...) Expand all
33 int magic() => _private++; 33 int magic() => _private++;
34 } 34 }
35 """ 35 """
36 }; 36 };
37 37
38 void main() { 38 void main() {
39 asyncTest(() async { 39 asyncTest(() async {
40 var result = await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES); 40 var result = await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
41 var compiler = result.compiler; 41 var compiler = result.compiler;
42 42
43 var superclass = 43 dynamic superclass =
44 findElement(compiler, 'Super', Uri.parse('memory:lib.dart')); 44 findElement(compiler, 'Super', Uri.parse('memory:lib.dart'));
45 var subclass = findElement(compiler, 'Subclass'); 45 dynamic subclass = findElement(compiler, 'Subclass');
46 var oracle = compiler.backend.mirrorsData.isMemberAccessibleByReflection; 46 var oracle = compiler.backend.mirrorsData.isMemberAccessibleByReflection;
47 print(superclass.lookupMember('_private')); 47 print(superclass.lookupMember('_private'));
48 Expect.isTrue(oracle(superclass.lookupMember('_private'))); 48 Expect.isTrue(oracle(superclass.lookupMember('_private')));
49 Expect.isFalse(oracle(subclass.lookupMember('_private'))); 49 Expect.isFalse(oracle(subclass.lookupMember('_private')));
50 }); 50 });
51 } 51 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/metadata_test.dart ('k') | tests/compiler/dart2js/mixin_typevariable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698