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

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

Issue 1284673003: Move dart2jslib parts into separate libraries. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix try. Created 5 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 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 we are analyzing field parameters correctly. 5 // Test that we are analyzing field parameters correctly.
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 'compiler_helper.dart'; 9 import 'compiler_helper.dart';
10 import 'parser_helper.dart';
11 import 'type_mask_test_helper.dart'; 10 import 'type_mask_test_helper.dart';
12 11
13 const String TEST = """ 12 const String TEST = """
14 13
15 class A { 14 class A {
16 final dynamicField; 15 final dynamicField;
17 A() : dynamicField = 42; 16 A() : dynamicField = 42;
18 A.bar(this.dynamicField); 17 A.bar(this.dynamicField);
19 } 18 }
20 19
(...skipping 13 matching lines...) Expand all
34 var cls = findElement(compiler, className); 33 var cls = findElement(compiler, className);
35 var element = cls.lookupLocalMember(fieldName); 34 var element = cls.lookupLocalMember(fieldName);
36 Expect.equals(type, 35 Expect.equals(type,
37 simplify(typesInferrer.getTypeOfElement(element), compiler)); 36 simplify(typesInferrer.getTypeOfElement(element), compiler));
38 } 37 }
39 38
40 checkFieldTypeInClass('A', 'dynamicField', 39 checkFieldTypeInClass('A', 'dynamicField',
41 findTypeMask(compiler, 'Interceptor', 'nonNullSubclass')); 40 findTypeMask(compiler, 'Interceptor', 'nonNullSubclass'));
42 })); 41 }));
43 } 42 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698