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

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

Issue 2290893002: kernel -> ssa: support static invocations and variable gets (Closed)
Patch Set: rename typemask function 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 | « tests/compiler/dart2js/kernel/helper.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 import 'package:test/test.dart'; 1 import 'package:test/test.dart';
2 2
3 import 'helper.dart' show check; 3 import 'helper.dart' show check;
4 4
5 main() { 5 main() {
6 group('compile function that returns a value', () { 6 group('compile function that returns a value', () {
7 test('constant int', () { 7 test('constant int', () {
8 return check("main() { return 1; }"); 8 return check('main() { return 1; }');
9 }); 9 });
10 10
11 test('constant double', () { 11 test('constant double', () {
12 return check("main() { return 1.0; }"); 12 return check('main() { return 1.0; }');
13 }); 13 });
14 14
15 test('constant string', () { 15 test('constant string', () {
16 return check("main() { return 'hello'; }"); 16 return check('main() { return "hello"; }');
17 }); 17 });
18 18
19 test('constant bool', () { 19 test('constant bool', () {
20 return check("main() { return true; }"); 20 return check('main() { return true; }');
21 }); 21 });
22 22
23 test('constant symbol', () { 23 test('constant symbol', () {
24 return check("main() { return #hello; }"); 24 return check('main() { return #hello; }');
25 }); 25 });
26 26
27 test('null', () { 27 test('null', () {
28 return check("main() { return null; }"); 28 return check('main() { return null; }');
29 }); 29 });
30 }); 30 });
31
32 test('compile function that returns its argument', () {
33 String code = '''
34 foo(x) {
35 return x;
36 }
37
38 main() {
39 foo(1);
40 }''';
41 return check(code, entry: 'foo');
42 });
31 } 43 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/kernel/helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698