示例
Compare structs in tests where reflect.DeepEqual is wrong or unusable
sha256:55ce200247ad6334adf868c2f9ec32f994a94b2ff4d0fc6ac211f4b03de32d9c
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Compare structs in tests where reflect.DeepEqual is wrong or unusable FIX
- 包
- github.com/google/go-cmp 0.7.0
- 环境
- go 1.26
- 创建时间
- 2026-08-13T18:44:22Z
契约
- 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
文件
- csx.json
- go.mod
- go.sum
- src/diff.go
- test/main.go
原始种子者
验证回执
- 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