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

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

Issue 2353793002: kernel->ssa: implement top-level getters and setters (Closed)
Patch Set: extract common subexpression Created 4 years, 3 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 | « pkg/compiler/lib/src/ssa/builder_kernel.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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:test/test.dart';
6
7 import 'helper.dart' show check;
8
9 main() {
10 group('compile getters with kernel', () {
11 test('top-level', () {
12 String code = '''
13 int get foo => 1;
14 main() => foo;
15 ''';
16 return check(code);
17 });
18
19 test('static', () {
20 String code = '''
21 class A {
22 static int get foo => 1;
23 }
24 main() => A.foo;
25 ''';
26 return check(code);
27 });
28 });
29
30 group('compile setters with kernel', () {
31 test('top-level', () {
32 String code = '''
33 set foo(int newFoo) {
34 // do nothing
35 }
36 main() {
37 foo = 1;
38 }''';
39 return check(code);
40 });
41
42 test('static', () {
43 String code = '''
44 class A {
45 static set foo(int newFoo) {
46 // do nothing
47 }
48 }
49 main() {
50 A.foo = 1;
51 }
52 ''';
53 return check(code);
54 });
55 });
56 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder_kernel.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698