Chromium Code Reviews| Index: pkg/polymer_expressions/test/eval_test.dart |
| diff --git a/pkg/polymer_expressions/test/eval_test.dart b/pkg/polymer_expressions/test/eval_test.dart |
| index 3094994c9d740f4b934080a797187aff2467ddf7..744284e8ce0c1604f6b7ba22fd1786cca576f325 100644 |
| --- a/pkg/polymer_expressions/test/eval_test.dart |
| +++ b/pkg/polymer_expressions/test/eval_test.dart |
| @@ -108,6 +108,16 @@ main() { |
| expectEval('false && false', false); |
| }); |
| + test('should evaulate ternary operators', () { |
| + expectEval('true ? 1 : 2', 1); |
| + expectEval('false ? 1 : 2', 2); |
| + expectEval('true ? true ? 1 : 2 : 3', 1); |
| + expectEval('true ? false ? 1 : 2 : 3', 2); |
| + expectEval('false ? true ? 1 : 2 : 3', 3); |
| + expectEval('false ? 1 : true ? 2 : 3', 2); |
| + expectEval('false ? 1 : false ? 2 : 3', 3); |
|
Jennifer Messerly
2014/01/28 00:03:29
maybe add a test for `null` and some other kind of
justinfagnani
2014/01/28 01:05:21
Done.
|
| + }); |
| + |
| test('should invoke a method on the model', () { |
| var foo = new Foo(name: 'foo', age: 2); |
| expectEval('x()', foo.x(), foo); |