idea-plugin / arrow.meta.ide.testing.env.types / LightTestSyntax

LightTestSyntax

object LightTestSyntax

LightTestSyntax utilises common patterns in test environments for headless ide instances.

Functions

filterFold filters through a StringBuilder for a specific str and returns all collected instances within container F.tailrec fun <F> StringBuilder.filterFold(acc: F, str: String, f: (acc: F, index: Int) -> F): F
highlighting instantiates the KtFile and returns highlighting information, filtering out toIgnore.fun KtFile.highlighting(myFixture: CodeInsightTestFixture, toIgnore: List<Int>, changes: (KtFile) -> Boolean = { it.isScript() }): List<HighlightInfo>
ktFileToList traverses the Source code and deconstructs the KtFile into a List, based on traversal, which has several forms, such as TreeTraversal.POST_ORDER_DFS, TreeTraversal.PRE_ORDER_DFS, TreeTraversal.TRACING_BFS, …fun Source.ktFileToList(myFixture: CodeInsightTestFixture, traversal: TreeTraversal = TreeTraversal.PLAIN_BFS): List<PsiElement>
toKtFile transforms Source string to a KtFile.fun Source.toKtFile(myFixture: CodeInsightTestFixture): KtFile?
traverse traverses each PsiElement marked by match with function f. Look up is case-insensitive.fun <A> Source.traverse(match: String = "<caret>", myFixture: CodeInsightTestFixture, f: (PsiElement) -> A): List<A>

Do you like Arrow?

Arrow Org
<