Inline two methods in TypeICompilerTestCase. We aren't using the saved mode anywhere.
@@ -92,10 +92,14 @@ public abstract class TypeICompilerTestCase extends CompilerTestCase {
protected void testExternChanges(String extern, String input, String expectedExtern,
DiagnosticType... warnings) {
if (this.mode.runsOTI()) {
- testExternChangesOTI(extern, input, expectedExtern, warnings);
+ enableTypeCheck();
+ super.testExternChanges(extern, input, expectedExtern, warnings);
+ disableTypeCheck();
}
if (this.mode.runsNTI()) {
- testExternChangesNTI(extern, input, expectedExtern, warnings);
+ enableNewTypeInference();
+ super.testExternChanges(extern, input, expectedExtern, warnings);
+ disableNewTypeInference();
}
if (this.mode.runsNeither()) {
super.testExternChanges(extern, input, expectedExtern, warnings);
@@ -148,26 +152,6 @@ public abstract class TypeICompilerTestCase extends CompilerTestCase {
this.mode = saved;
}
- private void testExternChangesOTI(String extern, String input, String expectedExtern,
- DiagnosticType... warnings) {
- TypeInferenceMode saved = this.mode;
- this.mode = TypeInferenceMode.OTI_ONLY;
- enableTypeCheck();
- super.testExternChanges(extern, input, expectedExtern, warnings);
- disableTypeCheck();
- this.mode = saved;
- }
-
- private void testExternChangesNTI(String extern, String input, String expectedExtern,
- DiagnosticType... warnings) {
- TypeInferenceMode saved = this.mode;
- this.mode = TypeInferenceMode.NTI_ONLY;
- enableNewTypeInference();
- super.testExternChanges(extern, input, expectedExtern, warnings);
- disableNewTypeInference();
- this.mode = saved;
- }
-
void testWarningOtiNti(
String js, DiagnosticType otiWarning, DiagnosticType ntiWarning) {
TypeInferenceMode saved = this.mode;
