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

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

Issue 2299453004: kernel -> ssa: add tests for other simple operators (Closed)
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/kernel/binary_operators_test.dart
diff --git a/tests/compiler/dart2js/kernel/binary_operators_test.dart b/tests/compiler/dart2js/kernel/binary_operators_test.dart
index 1afaeb8a4b1c38f441e2c3aebd5b1b0d2680d85e..96f3fdb0621c196c159577b6fe9e4f6d915bc9cc 100644
--- a/tests/compiler/dart2js/kernel/binary_operators_test.dart
+++ b/tests/compiler/dart2js/kernel/binary_operators_test.dart
@@ -11,5 +11,17 @@ main() {
test('plus on ints', () {
return check('main() { return 1 + 2; }');
});
+ test('plus on strings', () {
+ return check('main() { return "a" + "b"; }');
+ });
+ test('plus on non-constants', () {
+ String code = '''
+ foo() => 1;
+ main() => foo() + foo();''';
+ return check(code);
+ });
+ test('other arithmetic operators', () {
+ return check('main() { return 1 + 2 * 3 - 4 / 5 % 6; }');
+ });
});
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698