mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 21:21:18 +00:00
Copy new JS Interop test from dev_compiler test suite.
The test was added in the issue #2394103002. R=vsm@google.com Review URL: https://codereview.chromium.org/2402163002 .
This commit is contained in:
parent
ba2c6e397c
commit
2a51e46153
|
@ -144,6 +144,14 @@ class _ClassWithConstructor {
|
|||
external get b;
|
||||
}
|
||||
|
||||
@JS('ClassWithConstructor')
|
||||
class ClassWithFactory {
|
||||
external factory ClassWithFactory(aParam, bParam);
|
||||
external getA();
|
||||
external get a;
|
||||
external get b;
|
||||
}
|
||||
|
||||
@JS()
|
||||
class JS$_PrivateClass {
|
||||
external JS$_PrivateClass(aParam, bParam);
|
||||
|
@ -324,6 +332,12 @@ main() {
|
|||
expect(o.b, equals("bar"));
|
||||
expect(o.getA(), equals("foo"));
|
||||
});
|
||||
test('external factory', () {
|
||||
var o = new ClassWithFactory("foo", "bar");
|
||||
expect(o.a, equals("foo"));
|
||||
expect(o.b, equals("bar"));
|
||||
expect(o.getA(), equals("foo"));
|
||||
});
|
||||
});
|
||||
|
||||
group('private class', () {
|
||||
|
|
Loading…
Reference in a new issue