@@ -19,7 +19,6 @@ import org.jetbrains.kotlinx.dataframe.impl.catchSilent
1919import org.jetbrains.kotlinx.dataframe.type
2020import org.junit.Test
2121import java.util.Locale
22- import java.util.UUID
2322import kotlin.random.Random
2423import kotlin.reflect.typeOf
2524import kotlin.time.Duration
@@ -30,6 +29,8 @@ import kotlin.time.Duration.Companion.milliseconds
3029import kotlin.time.Duration.Companion.minutes
3130import kotlin.time.Duration.Companion.nanoseconds
3231import kotlin.time.Duration.Companion.seconds
32+ import kotlin.uuid.ExperimentalUuidApi
33+ import kotlin.uuid.Uuid
3334import java.time.Duration as JavaDuration
3435import java.time.Instant as JavaInstant
3536
@@ -483,27 +484,28 @@ class ParseTests {
483484 df.parse()
484485 }
485486
487+ @OptIn(ExperimentalUuidApi ::class )
486488 @Test
487- fun `parse valid UUID ` () {
488- val uuidString = " 550e8400-e29b-41d4-a716-446655440000"
489- val column by columnOf(uuidString )
489+ fun `parse valid Uuid ` () {
490+ val validUUID = " 550e8400-e29b-41d4-a716-446655440000"
491+ val column by columnOf(validUUID )
490492 val parsed = column.parse()
491493
492- parsed.type() shouldBe typeOf<UUID >()
493- (parsed[0 ] as UUID ).toString() shouldBe uuidString
494+ parsed.type() shouldBe typeOf<Uuid >()
495+ (parsed[0 ] as Uuid ).toString() shouldBe validUUID // Change UUID to Uuid
494496 }
495497
498+ @OptIn(ExperimentalUuidApi ::class )
496499 @Test
497- fun `parse invalid UUID ` (){
498- val invalidUUID = " this is not a UUID"
499- val column = columnOf(invalidUUID)
500- val parsed = column.tryParse() // tryParse as string is not formatted.
500+ fun `parse invalid Uuid ` () {
501+ val invalidUUID = " this is not a UUID"
502+ val column = columnOf(invalidUUID)
503+ val parsed = column.tryParse() // tryParse as string is not formatted.
501504
502- parsed.type() shouldNotBe typeOf<UUID >()
503- parsed.type() shouldBe typeOf<String >()
505+ parsed.type() shouldNotBe typeOf<Uuid >()
506+ parsed.type() shouldBe typeOf<String >()
504507 }
505508
506-
507509 /* *
508510 * Asserts that all elements of the iterable are equal to each other
509511 */
0 commit comments