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

Unified Diff: tests/compiler/dart2js/kernel/simple_function_test.dart

Issue 2280133002: implement kernel -> ssa for literals (Closed)
Patch Set: put ast accesses in separate class 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
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 9daf5e3e37049d72369de07b9e6294df8ff6b002..c252716fc281a7a4372bb35e4824b54550f35465 100644
--- a/tests/compiler/dart2js/kernel/simple_function_test.dart
+++ b/tests/compiler/dart2js/kernel/simple_function_test.dart
@@ -3,7 +3,29 @@ import 'package:test/test.dart';
import 'helper.dart' show check;
main() {
- test('compile function that returns a constant', () {
- return check("main() { return 1; }");
+ group('compile function that returns a value', () {
+ test('constant int', () {
+ return check("main() { return 1; }");
+ });
+
+ test('constant double', () {
+ return check("main() { return 1.0; }");
+ });
+
+ test('constant string', () {
+ return check("main() { return 'hello'; }");
+ });
+
+ test('constant bool', () {
+ return check("main() { return true; }");
+ });
+
+ test('constant symbol', () {
+ return check("main() { return #hello; }");
+ });
+
+ test('null', () {
+ return check("main() { return null; }");
+ });
});
}

Powered by Google App Engine
This is Rietveld 408576698