mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
kernel -> ssa: add tests for other simple operators
R=sigmund@google.com Review URL: https://codereview.chromium.org/2299453004 .
This commit is contained in:
parent
ac81124b8c
commit
f57aa28577
1 changed files with 12 additions and 0 deletions
|
@ -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; }');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue