mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Fix tests
This commit is contained in:
parent
f9ac26b3af
commit
d145617f81
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
package net.mamoe.mirai.console
|
package net.mamoe.mirai.console
|
||||||
|
|
||||||
|
import com.vdurmont.semver4j.Semver
|
||||||
import kotlinx.coroutines.SupervisorJob
|
import kotlinx.coroutines.SupervisorJob
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
import kotlinx.coroutines.suspendCancellableCoroutine
|
import kotlinx.coroutines.suspendCancellableCoroutine
|
||||||
@ -25,10 +26,7 @@ import net.mamoe.mirai.console.util.ConsoleExperimentalAPI
|
|||||||
import net.mamoe.mirai.console.util.ConsoleInput
|
import net.mamoe.mirai.console.util.ConsoleInput
|
||||||
import net.mamoe.mirai.console.util.ConsoleInternalAPI
|
import net.mamoe.mirai.console.util.ConsoleInternalAPI
|
||||||
import net.mamoe.mirai.message.data.Message
|
import net.mamoe.mirai.message.data.Message
|
||||||
import net.mamoe.mirai.utils.BotConfiguration
|
import net.mamoe.mirai.utils.*
|
||||||
import net.mamoe.mirai.utils.DefaultLogger
|
|
||||||
import net.mamoe.mirai.utils.LoginSolver
|
|
||||||
import net.mamoe.mirai.utils.MiraiLogger
|
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import kotlin.coroutines.Continuation
|
import kotlin.coroutines.Continuation
|
||||||
import kotlin.coroutines.CoroutineContext
|
import kotlin.coroutines.CoroutineContext
|
||||||
@ -42,7 +40,15 @@ fun initTestEnvironment() {
|
|||||||
|
|
||||||
@ConsoleExperimentalAPI
|
@ConsoleExperimentalAPI
|
||||||
override val frontEndDescription: MiraiConsoleFrontEndDescription
|
override val frontEndDescription: MiraiConsoleFrontEndDescription
|
||||||
get() = TODO("Not yet implemented")
|
get() = object : MiraiConsoleFrontEndDescription {
|
||||||
|
override val name: String
|
||||||
|
get() = "Test"
|
||||||
|
override val vendor: String
|
||||||
|
get() = "Test"
|
||||||
|
override val version: Semver
|
||||||
|
get() = Semver("1.0.0")
|
||||||
|
|
||||||
|
}
|
||||||
override val mainLogger: MiraiLogger = DefaultLogger("main")
|
override val mainLogger: MiraiLogger = DefaultLogger("main")
|
||||||
override val builtInPluginLoaders: List<PluginLoader<*, *>> = listOf(DeferredPluginLoader { JarPluginLoader })
|
override val builtInPluginLoaders: List<PluginLoader<*, *>> = listOf(DeferredPluginLoader { JarPluginLoader })
|
||||||
override val consoleCommandSender: ConsoleCommandSender = object : ConsoleCommandSender() {
|
override val consoleCommandSender: ConsoleCommandSender = object : ConsoleCommandSender() {
|
||||||
@ -64,7 +70,7 @@ fun initTestEnvironment() {
|
|||||||
LoginSolver.Default
|
LoginSolver.Default
|
||||||
|
|
||||||
override fun newLogger(identity: String?): MiraiLogger {
|
override fun newLogger(identity: String?): MiraiLogger {
|
||||||
return DefaultLogger(identity)
|
return PlatformLogger(identity)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val coroutineContext: CoroutineContext = SupervisorJob()
|
override val coroutineContext: CoroutineContext = SupervisorJob()
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
object Versions {
|
object Versions {
|
||||||
const val core = "1.2.2"
|
const val core = "1.2.2"
|
||||||
const val console = "1.0-M3-dev-1"
|
const val console = "1.0-M3"
|
||||||
const val consoleGraphical = "0.0.7"
|
const val consoleGraphical = "0.0.7"
|
||||||
const val consoleTerminal = "0.1.0"
|
const val consoleTerminal = "0.1.0"
|
||||||
const val consolePure = console
|
const val consolePure = console
|
||||||
|
Loading…
Reference in New Issue
Block a user