0.1.7 release
This commit is contained in:
parent
6450696157
commit
b0950f8415
@ -1,12 +1,12 @@
|
||||
|
||||
plugins {
|
||||
val toolsVersion = "0.4.1"
|
||||
val toolsVersion = "0.4.2"
|
||||
id("scientifik.mpp") version toolsVersion apply false
|
||||
id("scientifik.jvm") version toolsVersion apply false
|
||||
id("scientifik.publish") version toolsVersion apply false
|
||||
}
|
||||
|
||||
val dataforgeVersion by extra("0.1.6-dev-2")
|
||||
val dataforgeVersion by extra("0.1.7")
|
||||
|
||||
val bintrayRepo by extra("dataforge")
|
||||
val githubProject by extra("dataforge-core")
|
||||
|
@ -1,6 +1,7 @@
|
||||
package hep.dataforge.io
|
||||
|
||||
import hep.dataforge.context.Global
|
||||
import hep.dataforge.meta.DFExperimental
|
||||
import kotlinx.io.asBinary
|
||||
import kotlinx.io.toByteArray
|
||||
import kotlinx.io.writeDouble
|
||||
@ -46,6 +47,7 @@ class FileBinaryTest {
|
||||
|
||||
}
|
||||
|
||||
@DFExperimental
|
||||
@Test
|
||||
fun testFileDataSizeRewriting() {
|
||||
println(System.getProperty("user.dir"))
|
||||
@ -53,6 +55,6 @@ class FileBinaryTest {
|
||||
Global.io.writeEnvelopeFile(tmpPath, envelope)
|
||||
|
||||
val binary = Global.io.readEnvelopeFile(tmpPath)?.data!!
|
||||
assertEquals(binary.size.toInt(), binary.toByteArray().size)
|
||||
assertEquals(binary.size, binary.toByteArray().size)
|
||||
}
|
||||
}
|
@ -8,8 +8,9 @@ import hep.dataforge.io.toByteArray
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import kotlinx.io.writeDouble
|
||||
import org.junit.AfterClass
|
||||
import org.junit.BeforeClass
|
||||
import org.junit.jupiter.api.AfterAll
|
||||
import org.junit.jupiter.api.BeforeAll
|
||||
import org.junit.jupiter.api.Timeout
|
||||
import kotlin.test.Test
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.time.ExperimentalTime
|
||||
@ -31,20 +32,21 @@ class EnvelopeServerTest {
|
||||
@JvmStatic
|
||||
val echoEnvelopeServer = EnvelopeServer(Global, 7778, EchoResponder, GlobalScope)
|
||||
|
||||
@BeforeClass
|
||||
@BeforeAll
|
||||
@JvmStatic
|
||||
fun start() {
|
||||
echoEnvelopeServer.start()
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
@AfterAll
|
||||
@JvmStatic
|
||||
fun close() {
|
||||
echoEnvelopeServer.stop()
|
||||
}
|
||||
}
|
||||
|
||||
@Test(timeout = 1000)
|
||||
@Test
|
||||
@Timeout(1)
|
||||
fun doEchoTest() {
|
||||
val request = Envelope {
|
||||
type = "test.echo"
|
||||
|
@ -98,7 +98,9 @@ interface Meta : MetaRepr {
|
||||
*/
|
||||
const val VALUE_KEY = "@value"
|
||||
|
||||
val EMPTY = EmptyMeta
|
||||
val EMPTY: Meta = object: MetaBase() {
|
||||
override val items: Map<NameToken, MetaItem<*>> = emptyMap()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -216,11 +218,6 @@ fun MetaItem<*>.seal(): MetaItem<SealedMeta> = when (this) {
|
||||
is NodeItem -> NodeItem(node.seal())
|
||||
}
|
||||
|
||||
@Deprecated("Use Meta.EMPTY instead", replaceWith = ReplaceWith("Meta.EMPTY"))
|
||||
object EmptyMeta : MetaBase() {
|
||||
override val items: Map<NameToken, MetaItem<*>> = emptyMap()
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsafe methods to access values and nodes directly from [MetaItem]
|
||||
*/
|
||||
|
@ -66,5 +66,7 @@ inline fun Encoder.encodeStructure(
|
||||
encoder.endStructure(desc)
|
||||
}
|
||||
|
||||
@OptIn(UnstableDefault::class)
|
||||
val JSON_PRETTY = Json(JsonConfiguration(prettyPrint = true, useArrayPolymorphism = true))
|
||||
@OptIn(UnstableDefault::class)
|
||||
val JSON_PLAIN = Json(JsonConfiguration(prettyPrint = true, useArrayPolymorphism = true))
|
Loading…
Reference in New Issue
Block a user