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/serialization/test_data.dart

Issue 2119193002: Compute correct names for closures in operator methods. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.serialization_test_data; 5 library dart2js.serialization_test_data;
6 6
7 const List<Test> TESTS = const <Test>[ 7 const List<Test> TESTS = const <Test>[
8 const Test('Empty program', const { 8 const Test('Empty program', const {
9 'main.dart': 'main() {}' 9 'main.dart': 'main() {}'
10 }), 10 }),
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 'a.dart': ''' 537 'a.dart': '''
538 import 'b.dart' deferred as pre; 538 import 'b.dart' deferred as pre;
539 import 'c.dart' deferred as pre; 539 import 'c.dart' deferred as pre;
540 test() {} 540 test() {}
541 ''', 541 ''',
542 'b.dart': ''' 542 'b.dart': '''
543 ''', 543 ''',
544 'c.dart': ''' 544 'c.dart': '''
545 ''', 545 ''',
546 }, expectedErrorCount: 1), 546 }, expectedErrorCount: 1),
547
548 const Test('Closure in operator function', const {
549 'main.dart': '''
550 import 'a.dart';
551
552 main() {
553 test();
554 }
555 ''',
556 }, preserializedSourceFiles: const {
557 'a.dart': '''
558 class C {
559 operator ==(other) => () {};
560 }
561
562 test() => new C() == null;
563 ''',
564 }),
547 ]; 565 ];
548 566
549 class Test { 567 class Test {
550 final String name; 568 final String name;
551 final Map sourceFiles; 569 final Map sourceFiles;
552 final Map preserializedSourceFiles; 570 final Map preserializedSourceFiles;
553 final Map unserializedSourceFiles; 571 final Map unserializedSourceFiles;
554 final int expectedErrorCount; 572 final int expectedErrorCount;
555 final int expectedWarningCount; 573 final int expectedWarningCount;
556 final int expectedHintCount; 574 final int expectedHintCount;
557 final int expectedInfoCount; 575 final int expectedInfoCount;
558 576
559 const Test( 577 const Test(
560 this.name, 578 this.name,
561 this.sourceFiles, 579 this.sourceFiles,
562 {this.preserializedSourceFiles, 580 {this.preserializedSourceFiles,
563 this.unserializedSourceFiles, 581 this.unserializedSourceFiles,
564 this.expectedErrorCount: 0, 582 this.expectedErrorCount: 0,
565 this.expectedWarningCount: 0, 583 this.expectedWarningCount: 0,
566 this.expectedHintCount: 0, 584 this.expectedHintCount: 0,
567 this.expectedInfoCount: 0}); 585 this.expectedInfoCount: 0});
568 } 586 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698