kernel -> ssa: add tests for other simple operators

R=sigmund@google.com

Review URL: https://codereview.chromium.org/2299453004 .
This commit is contained in:
Harry Terkelsen 2016-08-31 16:17:53 -07:00
parent ac81124b8c
commit f57aa28577

View file

@ -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; }');
});
});
}