Skip to content

Commit 53868f3

Browse files
committed
Fix test
1 parent 43dec23 commit 53868f3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/kotlin/io/github/projectmapk/jackson/module/kogera/zIntegration/deser/DeserializeByConstructorWithDefaultArgumentsTest.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package io.github.projectmapk.jackson.module.kogera.zIntegration.deser
22

3+
import io.github.projectmapk.jackson.module.kogera.assertReflectEquals
34
import io.github.projectmapk.jackson.module.kogera.defaultMapper
45
import io.github.projectmapk.jackson.module.kogera.readValue
56
import org.junit.jupiter.api.Assertions.assertEquals
@@ -8,7 +9,7 @@ import org.junit.jupiter.api.Test
89
/**
910
* Up to argument size 32 there is one mask argument for the default argument,
1011
* 33 ~ 64 there are two, and 65 there are three, so each boundary value is tested.
11-
* Also, if the default argument is set, the maximum argument size that can be set in the constructor is 244,
12+
* Also, if the default argument is set, the maximum argument size that can be set in the constructor is 245,
1213
* so that case is tested as well.
1314
*/
1415
class DeserializeByConstructorWithDefaultArgumentsTest {
@@ -238,7 +239,8 @@ class DeserializeByConstructorWithDefaultArgumentsTest {
238239
assertEquals(Dst65(), defaultMapper.readValue<Dst65>("{}"))
239240
}
240241

241-
data class DstMax(
242+
// It cannot be a data class because the generated method would exceed the argument size limit.
243+
class DstMax(
242244
val p000: String = "0",
243245
val p001: String = "1",
244246
val p002: String = "2",
@@ -488,6 +490,6 @@ class DeserializeByConstructorWithDefaultArgumentsTest {
488490

489491
@Test
490492
fun testMax() {
491-
assertEquals(DstMax(), defaultMapper.readValue<DstMax>("{}"))
493+
assertReflectEquals(DstMax(), defaultMapper.readValue<DstMax>("{}"))
492494
}
493495
}

0 commit comments

Comments
 (0)