| Index: tests/compiler/dart2js/js_backend_cps_ir_test.dart
|
| diff --git a/tests/compiler/dart2js/js_backend_cps_ir_test.dart b/tests/compiler/dart2js/js_backend_cps_ir_test.dart
|
| index df21e239e9825f043c0d19478d6a0a47c1e64cb8..68df2f10ffdb6776199eac45ce5f7e77e5813b3f 100644
|
| --- a/tests/compiler/dart2js/js_backend_cps_ir_test.dart
|
| +++ b/tests/compiler/dart2js/js_backend_cps_ir_test.dart
|
| @@ -68,6 +68,39 @@ main() { return foo(); }
|
| function() {
|
| return null;
|
| }"""),
|
| + const TestEntry("main() { return true ? 42 : 'foo'; }"),
|
| + const TestEntry("""
|
| +foo() => foo;
|
| +main() {
|
| + print(foo() ? "hello world" : "bad bad");
|
| +}""",
|
| +"""function() {
|
| + P.print(P.identical(V.foo(), true) ? "hello world" : "bad bad");
|
| + return null;
|
| +}"""),
|
| + const TestEntry("""
|
| +get foo => foo;
|
| +main() {
|
| + print(foo ? "hello world" : "bad bad");
|
| +}""",
|
| +"""function() {
|
| + P.print(P.identical(V.foo(), true) ? "hello world" : "bad bad");
|
| + return null;
|
| +}"""),
|
| + const TestEntry("""
|
| +get foo => foo;
|
| +main() { print(foo && foo); }""",
|
| +"""function() {
|
| + P.print(P.identical(V.foo(), true) && P.identical(V.foo(), true));
|
| + return null;
|
| +}"""),
|
| + const TestEntry("""
|
| +get foo => foo;
|
| +main() { print(foo || foo); }""",
|
| +"""function() {
|
| + P.print(P.identical(V.foo(), true) || P.identical(V.foo(), true));
|
| + return null;
|
| +}"""),
|
| ];
|
|
|
| String formatTest(Map test) {
|
| @@ -92,7 +125,11 @@ main() {
|
| Expect.isNotNull(compiler.assembledCode);
|
| String expectation = test.expectation;
|
| if (expectation != null) {
|
| - Expect.equals(test.expectation, getCodeForMain(compiler));
|
| + String expected = test.expectation;
|
| + String found = getCodeForMain(compiler);
|
| + if (expected != found) {
|
| + Expect.fail('Expected:\n$expected\nbut found\n$found');
|
| + }
|
| }
|
| }).catchError((e) {
|
| print(e);
|
|
|