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

Unified Diff: tests/language/src/MethodBindingTest.dart

Issue 8914024: frog: better binding of methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 9 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 | « tests/language/language.status ('k') | tests/language/src/PropertyFieldOverrideTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/MethodBindingTest.dart
diff --git a/tests/language/src/MethodBindingTest.dart b/tests/language/src/MethodBindingTest.dart
index 260964d912cf6f0d0bf9b6a9694cd3d46f3536d9..e5401164d8f8ebfaf83f5ea077e1dedd4c18f9cc 100644
--- a/tests/language/src/MethodBindingTest.dart
+++ b/tests/language/src/MethodBindingTest.dart
@@ -124,6 +124,17 @@ class MethodBindingTest {
A.func = A.foo;
Expect.equals(4, A.func());
+ // bind a function that is possibly native in Javascript.
+ String o15 = 'hithere';
+ var f15 = o15.substring;
+ Expect.equals('i', f15(1, 2));
+
+ var o16 = 'hithere';
+ var f16 = o16.substring;
+ Expect.equals('i', f16(1, 2));
+
+ var f17 = 'hithere'.substring;
+ Expect.equals('i', f17(1, 2));
}
static testMain() {
« no previous file with comments | « tests/language/language.status ('k') | tests/language/src/PropertyFieldOverrideTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698