Chromium Code Reviews| Index: tests/compiler/dart2js_extra/this_phi_elimination_test.dart |
| =================================================================== |
| --- tests/compiler/dart2js_extra/this_phi_elimination_test.dart (revision 10872) |
| +++ tests/compiler/dart2js_extra/this_phi_elimination_test.dart (working copy) |
| @@ -5,7 +5,7 @@ |
| class A { |
| foo(a) { |
| while (false) { |
| - // This call will make the builder want to put this as a phi. |
| + // This call will make the builder want to put [this] as a phi. |
| foo(0); |
| } |
| // This computation makes sure there will be a bailout version. |
| @@ -15,5 +15,11 @@ |
| main() { |
| Expect.equals(42, new A().foo(0)); |
| - Expect.equals("42", new A().foo("")); |
| + bool caughtException = false; |
|
kasperl
2012/08/17 11:30:53
Use Expect.throws(() => new A().foo(""), (e) => e
ngeoffray
2012/08/17 11:48:04
Good point. Done.
|
| + try { |
| + Expect.equals("42", new A().foo("")); |
| + } catch (NoSuchMethodException ex) { |
| + caughtException = true; |
| + } |
| + Expect.isTrue(caughtException); |
| } |