| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library dart2js.semantics_visitor_test; | 5 library dart2js.semantics_visitor_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
| 9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| (...skipping 3448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3459 element: 'parameter(#b)', | 3459 element: 'parameter(#b)', |
| 3460 index: 1), | 3460 index: 1), |
| 3461 const Visit(VisitKind.VISIT_FIELD_INITIALIZER, | 3461 const Visit(VisitKind.VISIT_FIELD_INITIALIZER, |
| 3462 element: 'field(C#field)', | 3462 element: 'field(C#field)', |
| 3463 rhs: 'a'), | 3463 rhs: 'a'), |
| 3464 ], | 3464 ], |
| 3465 method: ''), | 3465 method: ''), |
| 3466 const Test.clazz( | 3466 const Test.clazz( |
| 3467 ''' | 3467 ''' |
| 3468 class C { | 3468 class C { |
| 3469 var field1; |
| 3470 var field2; |
| 3471 C(a, b) : this.field1 = a, this.field2 = b; |
| 3472 } |
| 3473 ''', |
| 3474 const [ |
| 3475 const Visit(VisitKind.VISIT_GENERATIVE_CONSTRUCTOR_DECL, |
| 3476 element: 'generative_constructor(C#)', |
| 3477 parameters: '(a,b)', |
| 3478 body: ';'), |
| 3479 const Visit(VisitKind.VISIT_REQUIRED_PARAMETER_DECL, |
| 3480 element: 'parameter(#a)', |
| 3481 index: 0), |
| 3482 const Visit(VisitKind.VISIT_REQUIRED_PARAMETER_DECL, |
| 3483 element: 'parameter(#b)', |
| 3484 index: 1), |
| 3485 const Visit(VisitKind.VISIT_FIELD_INITIALIZER, |
| 3486 element: 'field(C#field1)', |
| 3487 rhs: 'a'), |
| 3488 const Visit(VisitKind.VISIT_FIELD_INITIALIZER, |
| 3489 element: 'field(C#field2)', |
| 3490 rhs: 'b'), |
| 3491 ], |
| 3492 method: ''), |
| 3493 const Test.clazz( |
| 3494 ''' |
| 3495 class C { |
| 3469 C(a, b) : this._(a, b); | 3496 C(a, b) : this._(a, b); |
| 3470 C._(a, b); | 3497 C._(a, b); |
| 3471 } | 3498 } |
| 3472 ''', | 3499 ''', |
| 3473 const [ | 3500 const [ |
| 3474 const Visit(VisitKind.VISIT_REDIRECTING_GENERATIVE_CONSTRUCTOR_DECL, | 3501 const Visit(VisitKind.VISIT_REDIRECTING_GENERATIVE_CONSTRUCTOR_DECL, |
| 3475 element: 'generative_constructor(C#)', | 3502 element: 'generative_constructor(C#)', |
| 3476 parameters: '(a,b)', | 3503 parameters: '(a,b)', |
| 3477 initializers: ':this._(a,b)'), | 3504 initializers: ':this._(a,b)'), |
| 3478 const Visit(VisitKind.VISIT_REQUIRED_PARAMETER_DECL, | 3505 const Visit(VisitKind.VISIT_REQUIRED_PARAMETER_DECL, |
| (...skipping 3907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7386 VISIT_REQUIRED_INITIALIZING_FORMAL_DECL, | 7413 VISIT_REQUIRED_INITIALIZING_FORMAL_DECL, |
| 7387 VISIT_OPTIONAL_INITIALIZING_FORMAL_DECL, | 7414 VISIT_OPTIONAL_INITIALIZING_FORMAL_DECL, |
| 7388 VISIT_NAMED_INITIALIZING_FORMAL_DECL, | 7415 VISIT_NAMED_INITIALIZING_FORMAL_DECL, |
| 7389 | 7416 |
| 7390 VISIT_UNRESOLVED_COMPOUND, | 7417 VISIT_UNRESOLVED_COMPOUND, |
| 7391 VISIT_UNRESOLVED_PREFIX, | 7418 VISIT_UNRESOLVED_PREFIX, |
| 7392 VISIT_UNRESOLVED_POSTFIX, | 7419 VISIT_UNRESOLVED_POSTFIX, |
| 7393 | 7420 |
| 7394 // TODO(johnniwinther): Add tests for more error cases. | 7421 // TODO(johnniwinther): Add tests for more error cases. |
| 7395 } | 7422 } |
| OLD | NEW |