Inline KotlinLiteFixture#loadFile, refactor surroundings

This commit is contained in:
Alexander Udalov
2016-02-23 18:19:36 +03:00
parent 1be6046fc2
commit adea547d8a
6 changed files with 26 additions and 71 deletions
@@ -58,7 +58,7 @@ abstract class AbstractConstraintSystemTest() : KotlinLiteFixture() {
override fun tearDown() {
_typeResolver = null
_testDeclarations = null
super<KotlinLiteFixture>.tearDown()
super.tearDown()
}
override fun getTestDataPath(): String {
@@ -68,7 +68,7 @@ abstract class AbstractConstraintSystemTest() : KotlinLiteFixture() {
private fun analyzeDeclarations(): ConstraintSystemTestData {
val fileName = "declarations.kt"
val psiFile = createPsiFile(null, fileName, loadFile(fileName))!!
val psiFile = createPsiFile(null, fileName, KotlinTestUtils.doLoadFile(testDataPath, fileName))!!
val bindingContext = JvmResolveUtil.analyzeOneFileWithJavaIntegrationAndCheckForErrors(psiFile).bindingContext
return ConstraintSystemTestData(bindingContext, project, typeResolver)
}