Chromium Code Reviews| 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..efe6723a367021da3ee93433c7c8e75fe4f91a80 100644 |
| --- a/tests/html/js_typed_interop_test.dart |
| +++ b/tests/html/js_typed_interop_test.dart |
| @@ -124,7 +124,9 @@ class Foo { |
| external callClosureWithArg1(Function closure, arg1); |
| external callClosureWithArg2(Function closure, arg1, arg2); |
| external Bar getBar(); |
| - external static num multiplyDefault2(num a, [num b]); |
| + |
| + // Note: the default value `3` will not be provided to JS. |
| + external static num multiplyDefault2(num a, [num b = 3]); |
|
Jacob
2016/02/11 17:54:33
instead of adding this test here, add this as a la
Siggi Cherem (dart-lang)
2016/02/11 21:16:53
I got the test out on a separate file, however, I'
|
| } |
| @anonymous |
| @@ -277,14 +279,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; |
| }); |
| }); |