[LL] Add test for KmpModuleSorter
KTIJ-27569
This commit is contained in:
committed by
Space Team
parent
ce3c05500e
commit
24b19e3c32
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.analysis.test.framework
|
||||
|
||||
import com.intellij.mock.MockProject
|
||||
import com.intellij.openapi.project.Project
|
||||
import org.junit.jupiter.api.AfterEach
|
||||
import org.junit.jupiter.api.BeforeEach
|
||||
|
||||
/**
|
||||
* Note that the project created by this class is a completely non-functional stub.
|
||||
* It is only useful in tests that don't depend on Project's functionality.
|
||||
*/
|
||||
abstract class TestWithMockProject : TestWithDisposable() {
|
||||
private var _project: Project? = null
|
||||
protected val project: Project get() = _project!!
|
||||
|
||||
@BeforeEach
|
||||
fun initProject() {
|
||||
_project = MockProject(null, disposable)
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
fun cleanup() {
|
||||
_project = null
|
||||
}
|
||||
}
|
||||
+4
@@ -25,4 +25,8 @@ class KtSourceModuleImpl(
|
||||
override val directRegularDependencies: MutableList<KtModule> = mutableListOf()
|
||||
override val directDependsOnDependencies: MutableList<KtModule> = mutableListOf()
|
||||
override val directFriendDependencies: MutableList<KtModule> = mutableListOf()
|
||||
|
||||
override fun toString(): String {
|
||||
return moduleName
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user