| Index: tests/compiler/dart2js/call_site_type_inferer_static_test.dart
|
| diff --git a/tests/compiler/dart2js/call_site_type_inferer_static_test.dart b/tests/compiler/dart2js/call_site_type_inferer_static_test.dart
|
| index d877ac9324d39325677416537dbf592fac02d3a9..43e947764511d527aa939396dee2e088fb88f0f6 100644
|
| --- a/tests/compiler/dart2js/call_site_type_inferer_static_test.dart
|
| +++ b/tests/compiler/dart2js/call_site_type_inferer_static_test.dart
|
| @@ -12,9 +12,11 @@
|
|
|
| void compileAndFind(String code,
|
| String functionName,
|
| + bool disableInlining,
|
| check(compiler, element)) {
|
| Uri uri = new Uri.fromComponents(scheme: 'source');
|
| var compiler = compilerFor(code, uri);
|
| + compiler.disableInlining = disableInlining;
|
| compiler.runCompiler(uri);
|
| var fun = findElement(compiler, functionName);
|
| return check(compiler.backend, fun);
|
| @@ -72,10 +74,13 @@ const String TEST_TEN = r"""
|
| main() { f(1); g(f); }
|
| """;
|
|
|
| -void runTest(String test, [List<HType> expectedTypes = null]) {
|
| +void doTest(String test,
|
| + bool enableInlining,
|
| + List<HType> expectedTypes) {
|
| compileAndFind(
|
| test,
|
| 'f',
|
| + enableInlining,
|
| (backend, x) {
|
| HTypeList types = backend.optimisticParameterTypes(x, null);
|
| if (expectedTypes != null) {
|
| @@ -87,6 +92,11 @@ void runTest(String test, [List<HType> expectedTypes = null]) {
|
| });
|
| }
|
|
|
| +void runTest(String test, [List<HType> expectedTypes]) {
|
| + doTest(test, false, expectedTypes);
|
| + doTest(test, true, expectedTypes);
|
| +}
|
| +
|
| void test() {
|
| runTest(TEST_ONE, [HType.STRING]);
|
| runTest(TEST_TWO, [HType.INTEGER]);
|
|
|