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

Side by Side Diff: tests/compiler/dart2js/kernel/getters_setters_test.dart

Issue 2685573002: Replace Backend with JavaScriptBackend. (Closed)
Patch Set: Updated cf. comment Created 3 years, 10 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
« no previous file with comments | « tests/compiler/dart2js/exit_code_test.dart ('k') | no next file » | 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) 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 import 'package:test/test.dart'; 5 import 'package:test/test.dart';
6 6
7 import 'helper.dart' show check; 7 import 'helper.dart' show check;
8 8
9 main() { 9 main() {
10 group('compile getters with kernel', () { 10 group('compile getters with kernel', () {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 class B extends A { 51 class B extends A {
52 52
53 int get rotations => super.nothing * 3; 53 int get rotations => super.nothing * 3;
54 } 54 }
55 55
56 main() => new B().foo; 56 main() => new B().foo;
57 '''; 57 ''';
58 return check(code); 58 return check(code);
59 }); 59 });
60
61 }); 60 });
62 61
63 group('compile setters with kernel', () { 62 group('compile setters with kernel', () {
64 test('top-level', () { 63 test('top-level', () {
65 String code = ''' 64 String code = '''
66 set foo(int newFoo) { 65 set foo(int newFoo) {
67 // do nothing 66 // do nothing
68 } 67 }
69 main() { 68 main() {
70 foo = 1; 69 foo = 1;
71 }'''; 70 }''';
72 return check(code); 71 return check(code);
73 }); 72 });
74 73
75 test('static', () { 74 test('static', () {
76 String code = ''' 75 String code = '''
77 class A { 76 class A {
78 static set foo(int newFoo) { 77 static set foo(int newFoo) {
79 // do nothing 78 // do nothing
80 } 79 }
81 } 80 }
82 main() { 81 main() {
83 A.foo = 1; 82 A.foo = 1;
84 } 83 }
85 '''; 84 ''';
86 return check(code); 85 return check(code);
87 }); 86 });
88 }); 87 });
89 88
90 test('super set', () { 89 test('super set', () {
91 String code = ''' 90 String code = '''
92 class A { 91 class A {
93 set ferocious(int newFerocious) {} 92 set ferocious(int newFerocious) {}
94 } 93 }
95 94
96 class B extends A { 95 class B extends A {
97 bar() { 96 bar() {
98 super.ferocious = 87; 97 super.ferocious = 87;
99 } 98 }
100 } 99 }
101 main() { 100 main() {
102 new B().bar(); 101 new B().bar();
103 }'''; 102 }''';
104 return check(code); 103 return check(code);
105 }); 104 });
106 105
107 test('super set no such method', () { 106 test('super set no such method', () {
108 String code = ''' 107 String code = '''
109 class A { 108 class A {
110 final ferocious = 0; 109 final ferocious = 0;
111 noSuchMethod(_) => 42; 110 noSuchMethod(_) => 42;
112 } 111 }
113 112
114 class B extends A { 113 class B extends A {
115 bar() { 114 bar() {
116 super.ferocious = 87; 115 super.ferocious = 87;
117 } 116 }
118 } 117 }
119 main() { 118 main() {
120 new B().bar(); 119 new B().bar();
121 }'''; 120 }''';
122 return check(code); 121 return check(code);
123 }); 122 });
124 } 123 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/exit_code_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698