Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: tests/language/mixin_proto_test.dart

Issue 2712603006: Use a `confuse` function. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/mixin_proto_test.dart
diff --git a/tests/language/mixin_proto_test.dart b/tests/language/mixin_proto_test.dart
index e195d904b4c21e22f1865f07f416cdc2acd7a822..e3967725ee0171c46c53daf2526934ffcf4e210b 100644
--- a/tests/language/mixin_proto_test.dart
+++ b/tests/language/mixin_proto_test.dart
@@ -26,11 +26,15 @@ class C extends A with B {
bar() => 499;
}
+@NoInline()
+@AssumeDynamic()
+confuse(x) => x;
+
main() {
var all = [new A(), new B(), new C()];
- Expect.equals(44, all[0].foo());
- Expect.equals(22, all[0].bar());
- Expect.equals(42, all[1].foo());
- Expect.equals(42, all[2].foo());
- Expect.equals(499, all[2].bar());
+ Expect.equals(44, confuse(all[0]).foo());
sra1 2017/02/24 17:30:08 FYI You could also write confuse(new A()) If yo
floitsch 2017/02/27 14:42:24 Acknowledged. I don't think that's necessary here.
+ Expect.equals(22, confuse(all[0]).bar());
+ Expect.equals(42, confuse(all[1]).foo());
+ Expect.equals(42, confuse(all[2]).foo());
+ Expect.equals(499, confuse(all[2]).bar());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698