4b860db14b
A single suite of test files is now shared among these configurations, each with their own expected outputs: - spec mode - strong mode - spec mode w/ type propagation Although some tests are going to focus on a specific configuration, for now it seems easier to maintain a single set of tests. No additional tests have been added in this CL, but the intention is to start adding more tests. The baseline tests no longer contain any checked-in dill files. To simplify dependencies, these tests do not rely on a patched SDK, which means the async transformer cannot currently be tested with this framework. BUG= R=kmillikin@google.com Review URL: https://chromereviews.googleplex.com/507347013 .
49 lines
1.1 KiB
Dart
49 lines
1.1 KiB
Dart
class Foo {
|
|
method(x, [y, z]) {
|
|
return "string";
|
|
}
|
|
}
|
|
|
|
abstract class External {
|
|
String externalMethod(int x, [int y, int z]);
|
|
void listen(Listener listener);
|
|
}
|
|
external External createExternal();
|
|
|
|
abstract class Listener {
|
|
void event(String input, [int x, int y]);
|
|
}
|
|
|
|
class TestListener extends Listener {
|
|
void event(input, [x, y]) {}
|
|
}
|
|
|
|
class ExtendedListener extends Listener {
|
|
void event(input, [x, y, z]) {}
|
|
}
|
|
|
|
class InvalidListener {
|
|
void event(input, [x]) {}
|
|
}
|
|
|
|
main() {
|
|
var foo = new Foo();
|
|
var string1 = foo.method(1);
|
|
var string2 = foo.method(1, 2);
|
|
var string3 = foo.method(1, 2, 3);
|
|
|
|
var extern = createExternal();
|
|
var string4 = extern.externalMethod(1);
|
|
var string5 = extern.externalMethod(1, 2);
|
|
var string6 = extern.externalMethod(1, 2, 3);
|
|
|
|
extern.listen(new TestListener());
|
|
extern.listen(new ExtendedListener());
|
|
extern.listen(new InvalidListener());
|
|
|
|
var nothing1 = foo.method();
|
|
var nothing2 = foo.method(1, 2, 3, 4);
|
|
var nothing3 = extern.externalMethod();
|
|
var nothing4 = extern.externalMethod(1, 2, 3, 4);
|
|
}
|