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

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

Issue 11228053: Get rid of more () in getter definitions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/compiler/dart2js/dart_backend_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import "dart:uri"; 5 import "dart:uri";
6 import "../../../lib/compiler/implementation/elements/elements.dart"; 6 import "../../../lib/compiler/implementation/elements/elements.dart";
7 import '../../../lib/compiler/implementation/scanner/scannerlib.dart'; 7 import '../../../lib/compiler/implementation/scanner/scannerlib.dart';
8 import '../../../lib/compiler/implementation/source_file.dart'; 8 import '../../../lib/compiler/implementation/source_file.dart';
9 import '../../../lib/compiler/implementation/types/types.dart'; 9 import '../../../lib/compiler/implementation/types/types.dart';
10 import '../../../lib/compiler/implementation/tree/tree.dart'; 10 import '../../../lib/compiler/implementation/tree/tree.dart';
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 result.checkFieldHasType('A', 'x', [result.int, result.bool]); 252 result.checkFieldHasType('A', 'x', [result.int, result.bool]);
253 result.checkFieldHasType('A', 'y', [result.string, new NullBaseType()]); 253 result.checkFieldHasType('A', 'y', [result.string, new NullBaseType()]);
254 result.checkFieldHasType('A', 'z', [result.string]); 254 result.checkFieldHasType('A', 'z', [result.string]);
255 } 255 }
256 256
257 testGetters() { 257 testGetters() {
258 final String source = r""" 258 final String source = r"""
259 class A { 259 class A {
260 var x; 260 var x;
261 A(this.x); 261 A(this.x);
262 get y() => x; 262 get y => x;
263 } 263 }
264 main() { 264 main() {
265 var a = new A(42); 265 var a = new A(42);
266 var foo = a.x; 266 var foo = a.x;
267 var bar = a.y; 267 var bar = a.y;
268 foo; bar; 268 foo; bar;
269 } 269 }
270 """; 270 """;
271 AnalysisResult result = analyze(source); 271 AnalysisResult result = analyze(source);
272 result.checkNodeHasType('foo', [result.int]); 272 result.checkNodeHasType('foo', [result.int]);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 testMutuallyRecusiveFunction(); 385 testMutuallyRecusiveFunction();
386 testConstructor(); 386 testConstructor();
387 testGetters(); 387 testGetters();
388 testSetters(); 388 testSetters();
389 testNamedParameters(); 389 testNamedParameters();
390 testListLiterals(); 390 testListLiterals();
391 testMapLiterals(); 391 testMapLiterals();
392 testReturn(); 392 testReturn();
393 // testNoReturn(); // right now we infer the empty type instead of null 393 // testNoReturn(); // right now we infer the empty type instead of null
394 } 394 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js/dart_backend_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698