-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
51 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
core/src/test/java/com/alibaba/fastjson2/issues/Issue736.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.alibaba.fastjson2.issues | ||
|
||
import com.alibaba.fastjson2.JSON | ||
import org.junit.jupiter.api.Assertions.assertEquals | ||
import org.junit.jupiter.api.Test | ||
import java.util.* | ||
|
||
class Issue736 { | ||
@Test | ||
fun test() { | ||
var bean = Bean( | ||
"","","",1,2,3 | ||
) | ||
var json = JSON.toJSONString(bean) | ||
var bean1 = JSON.parseObject(json, Bean::class.java) | ||
assertEquals(bean.a, bean1.a) | ||
} | ||
} | ||
|
||
data class Bean ( | ||
var a: String, | ||
var b: String, | ||
var c: String, | ||
var d: Int = 1, | ||
var e: Int = 9999, | ||
var f: Int = 0, | ||
var g: Calendar = Calendar.getInstance(), | ||
var h: Calendar = Calendar.getInstance(), | ||
var i: Calendar = Calendar.getInstance(), | ||
var j: String = "", | ||
var k: String = "", | ||
var l: String = "", | ||
var m: Int = 0, | ||
var n: String = "", | ||
var o: Int = 0, | ||
var p: Float = 0f, | ||
var q: Float = 0f, | ||
var r: Boolean = false, | ||
var s: Boolean = false, | ||
var t: Boolean = false, | ||
var u: String = "", | ||
var v: Int = 0, | ||
var w: Int = 0, | ||
var x: Int = 0, | ||
var y: String = "", | ||
var z: String = "", | ||
var a1: Int = 1, | ||
var a2: Calendar = Calendar.getInstance(), | ||
var a3: Int = 0 | ||
) { | ||
var a4: String = "" | ||
var a5: String = "" | ||
var a6: Int = 0 | ||
} |
51 changes: 0 additions & 51 deletions
51
core/src/test/java/com/alibaba/fastjson2/issues/Issue737.java
This file was deleted.
Oops, something went wrong.