dr.dreigh
06/07/2020, 9:17 AMdata class diff for com.sksamuel.kotest.eq.DataClass3
├ x: expected:<99> but was:<88>
├ y: data class diff for com.sksamuel.kotest.eq.DataClass2
│ ├ x: expected:<2> but was:<1>
│ ├ y: expected:<4.4f> but was:<3.4f>
│ └ z: data class diff for com.sksamuel.kotest.eq.DataClass1
│ ├ a: expected:<99> but was:<2>
│ └ b: expected:<7.6f> but was:<4.6f>
└ z: expected:<44.6> but was:<44.4>
I have got as far as I can on my own, there's quite a few bits in the code where I could do with a bit of help, they are marked TODO, or just HELP! 🙂
• I've added Any?.isDataClass
function to return true the instance is a data class and if the platform supports reflection. I'm not sure I've added all the implementations in the right places, or if I actually needed them all? (Non JVM kotlin is new to me!)
• Because this feature is not useful if the user decides to override equals()
in their data class, I've added a propertyConfig value showDetailedDataClassDiff
- however I'm not sure if a) the best way of accessing it form the DataClassEq.kt
class? and b) if this flag should be on a per spec basis rather than project? (or both?)
• I imagine that a very deeply nested data class would cause this code to stack overflow.
• I'm not sure where DataClassEq.kt should live because it contains platform dependent code.
Any help/suggestions/code changes/feedback would be greatly appreciated. Cheers!sam
06/07/2020, 11:23 AMdr.dreigh
06/07/2020, 12:19 PMdr.dreigh
06/07/2020, 12:19 PMsam
06/07/2020, 3:00 PMdr.dreigh
06/07/2020, 4:25 PMsam
06/07/2020, 4:26 PMsam
06/07/2020, 4:26 PMdr.dreigh
06/07/2020, 4:35 PMdr.dreigh
06/09/2020, 9:03 AMdr.dreigh
06/09/2020, 6:55 PMsam
06/09/2020, 7:14 PMdr.dreigh
06/10/2020, 6:53 PMsam
06/10/2020, 6:53 PMdr.dreigh
06/10/2020, 6:55 PMsam
06/10/2020, 7:07 PMdr.dreigh
06/11/2020, 6:51 PMTest shouldTimeout should pass if a coroutine takes longer than the given timeout[jvm] FAILED
Test executionError[jvm] FAILED
Wondering if they are bit flakey because they are timing based? Not sure I've done anything to affect that area.sam
06/11/2020, 6:54 PMdr.dreigh
06/11/2020, 6:58 PMsam
06/11/2020, 6:59 PMsam
06/11/2020, 6:59 PMsam
06/11/2020, 7:02 PMdr.dreigh
06/11/2020, 7:07 PMsam
06/11/2020, 7:14 PMdr.dreigh
06/11/2020, 7:41 PM