Skip to content

Commit

Permalink
T: check that PSI matches re-parsed text after applying an action
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad20012 committed Sep 17, 2020
1 parent 5194d9a commit 7ab9113
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/kotlin/org/rust/RsTestBase.kt
Expand Up @@ -26,6 +26,7 @@ import com.intellij.psi.impl.PsiManagerEx
import com.intellij.psi.util.PsiTreeUtil
import com.intellij.testFramework.LightProjectDescriptor
import com.intellij.testFramework.PlatformTestUtil
import com.intellij.testFramework.PsiTestUtil
import com.intellij.testFramework.UsefulTestCase
import com.intellij.testFramework.fixtures.BasePlatformTestCase
import com.intellij.util.text.SemVer
Expand Down Expand Up @@ -236,6 +237,7 @@ abstract class RsTestBase : BasePlatformTestCase(), RsTestCase {
) {
InlineFile(before)
action()
PsiTestUtil.checkPsiStructureWithCommit(myFixture.file, PsiTestUtil::checkPsiMatchesTextIgnoringNonCode)
myFixture.checkResult(replaceCaretMarker(after))
}

Expand Down

0 comments on commit 7ab9113

Please sign in to comment.