@@ -12,8 +12,6 @@ import kotlinx.serialization.encoding.CompositeDecoder.Companion.UNKNOWN_NAME
1212import kotlinx.serialization.modules.*
1313import kotlin.test.*
1414import kotlin.time.Duration
15- import kotlin.time.Instant
16- import kotlin.time.ExperimentalTime
1715
1816/*
1917 * Test ensures that type that aggregate all basic (primitive/collection/maps/arrays)
@@ -194,27 +192,6 @@ class BasicTypesSerializationTest {
194192 assertEquals(Duration .parseIsoString(durationString), other)
195193 }
196194
197- @OptIn(ExperimentalTime ::class )
198- @Test
199- fun testEncodeInstant () {
200- val sb = StringBuilder ()
201- val out = KeyValueOutput (sb)
202-
203- val instant = Instant .parse(" 2020-12-09T09:16:56.000124Z" )
204- out .encodeSerializableValue(Instant .serializer(), instant)
205-
206- assertEquals(" \" ${instant} \" " , sb.toString())
207- }
208-
209- @OptIn(ExperimentalTime ::class )
210- @Test
211- fun testDecodeInstant () {
212- val instantString = " 2020-12-09T09:16:56.000124Z"
213- val inp = KeyValueInput (Parser (StringReader (" \" $instantString \" " )))
214- val other = inp.decodeSerializableValue(Instant .serializer())
215- assertEquals(Instant .parse(instantString), other)
216- }
217-
218195 @Test
219196 fun testNothingSerialization () {
220197 // impossible to deserialize Nothing
0 commit comments