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

Unified Diff: tests/corelib/apply_test.dart

Issue 1513373002: Upgrade confuse() function in corelib tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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/corelib/apply_test.dart
diff --git a/tests/corelib/apply_test.dart b/tests/corelib/apply_test.dart
index e06cf6dcef5f23658b0c08b318a91d3243fee39d..0ad85b12f393b40a0acddbb00783f44fe530b710 100644
--- a/tests/corelib/apply_test.dart
+++ b/tests/corelib/apply_test.dart
@@ -25,14 +25,9 @@ class Callable {
int call(int x, int y) => x + y;
}
-confuse() {
- try {
- throw [Function.apply];
- } catch (e) {
- return e[0];
- }
- return null;
-}
+@NoInline()
+@AssumeDynamic()
+confuse(x) => x;
main() {
testMap(res, func, map) {
@@ -62,7 +57,7 @@ main() {
testList(42, cfoo, [32]);
// Test that apply works even with a different name.
- var app = confuse();
+ var app = confuse(Function.apply);
Expect.equals(42, app(test2, [22, 20]));
// Test that apply can itself be applied.
« 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