From ee2c958445940eeac84c535e5a94f19eef299488 Mon Sep 17 00:00:00 2001 From: sergeych Date: Sun, 12 Mar 2023 23:27:21 +0100 Subject: [PATCH] tests moved to common --- .../kotlin}/bipack/BipackEncoderTest.kt | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) rename src/{jvmTest/kotlin/net/sergeych => commonTest/kotlin}/bipack/BipackEncoderTest.kt (84%) diff --git a/src/jvmTest/kotlin/net/sergeych/bipack/BipackEncoderTest.kt b/src/commonTest/kotlin/bipack/BipackEncoderTest.kt similarity index 84% rename from src/jvmTest/kotlin/net/sergeych/bipack/BipackEncoderTest.kt rename to src/commonTest/kotlin/bipack/BipackEncoderTest.kt index 640d916..9387e1c 100644 --- a/src/jvmTest/kotlin/net/sergeych/bipack/BipackEncoderTest.kt +++ b/src/commonTest/kotlin/bipack/BipackEncoderTest.kt @@ -1,11 +1,10 @@ -package net.sergeych.bipack +package bipack import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import net.sergeych.bintools.toDump -import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Assertions.assertThrows -import org.junit.jupiter.api.Test +import net.sergeych.bipack.* +import kotlin.test.* @Serializable data class Foobar1N(val bar: Int, val foo: Int = 117) @@ -16,7 +15,6 @@ data class Foobar1(val bar: Int, val foo: Int = 117) @Serializable @ExtendableFormat -@SerialName("net.sergeych.bipack.Foobar1") data class Foobar2(val bar: Int, val foo: Int,val other: Int = -1) @Serializable @Framed @@ -26,7 +24,7 @@ data class FoobarF1(val bar: Int, val foo: Int = 117) @Serializable @Framed @ExtendableFormat -@SerialName("net.sergeych.bipack.FoobarF1") +@SerialName("bipack.FoobarF1") data class FoobarF2(val bar: Int, val foo: Int,val other: Int = -1) @Serializable @Framed @@ -54,7 +52,7 @@ class BipackEncoderTest { val c = BipackDecoder.decode(BipackEncoder.encode(a)) assertEquals(-1, c.other) assertEquals(a.bar, c.bar) - assertThrows(InvalidFrameException::class.java) { + assertFailsWith(InvalidFrameException::class) { BipackDecoder.decode(BipackEncoder.encode(a)) } }