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

Unified Diff: tests/html/js_typed_interop_test.dart

Issue 1688433006: cpsir: implementation of jsinterop in cps ir (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « tests/html/js_typed_interop_default_arg_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/js_typed_interop_test.dart
diff --git a/tests/html/js_typed_interop_test.dart b/tests/html/js_typed_interop_test.dart
index 14d931f0d69ec46d16ee00151d29406804ad76fe..431d533037e10d83a3493fd049c0da557b007927 100644
--- a/tests/html/js_typed_interop_test.dart
+++ b/tests/html/js_typed_interop_test.dart
@@ -124,6 +124,7 @@ class Foo {
external callClosureWithArg1(Function closure, arg1);
external callClosureWithArg2(Function closure, arg1, arg2);
external Bar getBar();
+
external static num multiplyDefault2(num a, [num b]);
}
@@ -277,14 +278,26 @@ main() {
});
});
- group('static method', () {
- test('call from dart', () {
+ group('static_method_call', () {
+ test('call directly from dart', () {
expect(Foo.multiplyDefault2(6, 7), equals(42));
expect(Foo.multiplyDefault2(6), equals(12));
+ });
+ });
+
+ // Note: these extra groups are added to be able to mark each test
+ // individually in status files. This should be split as separate test files.
+ group('static_method_tearoff_1', () {
+ test('call tearoff from dart', () {
MultiplyWithDefault tearOffMethod = Foo.multiplyDefault2;
expect(tearOffMethod(6, 6), equals(36));
+ });
+ });
+
+ group('static_method_tearoff_2', () {
+ test('call tearoff from dart', () {
+ MultiplyWithDefault tearOffMethod = Foo.multiplyDefault2;
expect(tearOffMethod(6), equals(12));
- Function untypedTearOff = Foo.multiplyDefault2;
});
});
« no previous file with comments | « tests/html/js_typed_interop_default_arg_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698