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

Unified 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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/kernel/helper.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/simple_function_test.dart
diff --git a/tests/compiler/dart2js/kernel/simple_function_test.dart b/tests/compiler/dart2js/kernel/simple_function_test.dart
index c252716fc281a7a4372bb35e4824b54550f35465..5b1985d2207d821616c03be84da8fc7515dfba37 100644
--- a/tests/compiler/dart2js/kernel/simple_function_test.dart
+++ b/tests/compiler/dart2js/kernel/simple_function_test.dart
@@ -5,27 +5,39 @@ import 'helper.dart' show check;
main() {
group('compile function that returns a value', () {
test('constant int', () {
- return check("main() { return 1; }");
+ return check('main() { return 1; }');
});
test('constant double', () {
- return check("main() { return 1.0; }");
+ return check('main() { return 1.0; }');
});
test('constant string', () {
- return check("main() { return 'hello'; }");
+ return check('main() { return "hello"; }');
});
test('constant bool', () {
- return check("main() { return true; }");
+ return check('main() { return true; }');
});
test('constant symbol', () {
- return check("main() { return #hello; }");
+ return check('main() { return #hello; }');
});
test('null', () {
- return check("main() { return null; }");
+ return check('main() { return null; }');
});
});
+
+ test('compile function that returns its argument', () {
+ String code = '''
+ foo(x) {
+ return x;
+ }
+
+ main() {
+ foo(1);
+ }''';
+ return check(code, entry: 'foo');
+ });
}
« 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