@@ -19,7 +19,6 @@ import org.jetbrains.kotlinx.dataframe.impl.catchSilent
19
19
import org.jetbrains.kotlinx.dataframe.type
20
20
import org.junit.Test
21
21
import java.util.Locale
22
- import java.util.UUID
23
22
import kotlin.random.Random
24
23
import kotlin.reflect.typeOf
25
24
import kotlin.time.Duration
@@ -30,6 +29,8 @@ import kotlin.time.Duration.Companion.milliseconds
30
29
import kotlin.time.Duration.Companion.minutes
31
30
import kotlin.time.Duration.Companion.nanoseconds
32
31
import kotlin.time.Duration.Companion.seconds
32
+ import kotlin.uuid.ExperimentalUuidApi
33
+ import kotlin.uuid.Uuid
33
34
import java.time.Duration as JavaDuration
34
35
import java.time.Instant as JavaInstant
35
36
@@ -483,27 +484,28 @@ class ParseTests {
483
484
df.parse()
484
485
}
485
486
487
+ @OptIn(ExperimentalUuidApi ::class )
486
488
@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 )
490
492
val parsed = column.parse()
491
493
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
494
496
}
495
497
498
+ @OptIn(ExperimentalUuidApi ::class )
496
499
@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.
501
504
502
- parsed.type() shouldNotBe typeOf<UUID >()
503
- parsed.type() shouldBe typeOf<String >()
505
+ parsed.type() shouldNotBe typeOf<Uuid >()
506
+ parsed.type() shouldBe typeOf<String >()
504
507
}
505
508
506
-
507
509
/* *
508
510
* Asserts that all elements of the iterable are equal to each other
509
511
*/
0 commit comments