@@ -24,7 +24,11 @@ import com.demonwav.mcdev.MinecraftProjectSettings
2424import com.demonwav.mcdev.framework.EdtInterceptor
2525import com.demonwav.mcdev.platform.mixin.BaseMixinTest
2626import com.demonwav.mcdev.util.BeforeOrAfter
27+ import com.demonwav.mcdev.util.invokeDeclaredMethod
2728import com.intellij.codeInsight.lookup.impl.LookupImpl
29+ import com.intellij.openapi.util.text.StringUtil
30+ import com.intellij.psi.PsiFile
31+ import com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl
2832import org.intellij.lang.annotations.Language
2933import org.junit.jupiter.api.Assertions.assertEquals
3034import org.junit.jupiter.api.Assertions.assertFalse
@@ -97,6 +101,26 @@ class MEExpressionCompletionTest : BaseMixinTest() {
97101 return
98102 }
99103
104+ // TODO: this is for debugging, remove this once we figure out why tests are failing
105+ try {
106+ val actual = StringUtil .convertLineSeparators(
107+ (fixture.invokeDeclaredMethod(
108+ " getHostFile" ,
109+ emptyArray(),
110+ emptyArray(),
111+ CodeInsightTestFixtureImpl ::class .java
112+ ) as PsiFile ).text
113+ )
114+ assertEquals(
115+ expectedAfter.replace(" <caret>" , " " ),
116+ actual
117+ ) {
118+ " File comparison failed, actual text: ${actual.ifEmpty { " <empty file oh no!>" }} "
119+ }
120+ } catch (e: ReflectiveOperationException ) {
121+ System .err.println (" Unable to call getHostFile" )
122+ }
123+
100124 fixture.checkResult(expectedAfter)
101125 }
102126
0 commit comments