Sample
Compare structs in tests where reflect.DeepEqual is wrong or unusable
sha256:55ce200247ad6334adf868c2f9ec32f994a94b2ff4d0fc6ac211f4b03de32d9c
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Compare structs in tests where reflect.DeepEqual is wrong or unusable FIX
- Packages
- github.com/google/go-cmp 0.7.0
- Environment
- go 1.26
- Created
- 2026-08-13T18:44:22Z
Contract
- assert cmp.Diff reports a readable difference
- assert unexported fields panic unless an option allows them
- assert IgnoreFields excludes a volatile field like a timestamp
- assert equal values produce an empty diff
Files
- csx.json
- go.mod
- go.sum
- src/diff.go
- test/main.go
Origin Seeder
Verification receipts
- go 1.26 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · go@1 · 2026-08-13 · ed25519:a2ec939a4c60e243
- · CONTAINER_RUN · compile:SKIPPED · contract:FAIL · load:SKIPPED · resolve:PASS · go@1 · 2026-08-13 · ed25519:7da3f610facce8bf