deep
deep copied to clipboard
Golang deep variable equality test that returns human-readable differences
Is recursion causing this? fatal error: concurrent map read and map write goroutine 213 [running]: runtime.throw({0x9fc28f, 0x45d4d9}) C:/Program Files/Go/src/runtime/panic.go:1198 +0x71 fp=0xc000546af8 sp=0xc000546ac8 pc=0x4337b1 runtime.mapaccess2(0xc0b963e1a0, 0xc015228750, 0xc0092a2f00) C:/Program Files/Go/src/runtime/map.go:469 +0x205 fp=0xc000546b38...
It would be great to have option to ignore order of items in slices/maps and just assert that it contains the same element.
deep.Equal does behave differently from reflect.DeepEqual when comparing functions. The documentation of reflect.DeepEqual states for functions: > Func values are deeply equal if both are nil; otherwise they are not...
Addresses: * https://github.com/go-test/deep/issues/3 (diffs are reported from their `reflect.Value` which will use `fmt.Stringer` if implemented * https://github.com/go-test/deep/issues/22 (`TimePrecision` will use `Truncate` on `time.Duration` and `time.Time` if non-zero) * https://github.com/go-test/deep/issues/32 (`Equal(bType)...
I’m documenting a few edge-case bugs that came up while I was tinkering with the package. I have a branch with fixes for most of the currently open issues as...
If I inspect the double linked datastructure described below: ``` type CLITree struct { Type argType Name string Children []*CLITree Parent *CLITree } ``` For a trivial datastructure I get...
https://github.com/go-test/deep/pull/33 broke the comparison of structs with errors in an unexported fields. THis code used to work just fine with deep 1.0.4, but panics with 1.0.7: ``` package main import...
Hi, would it be possible to add an option "TimePrecision" analog to "FloatPrecision" which would permit to Truncate the times before comparison. Reason: I use deep.Equal to test my Database...
Some packages may require Equal()'s parameters to be set in a particular way that is incompatible with other users within the same program. The global configuration parameters can be changed...
in commit https://github.com/go-test/deep/commit/929fce90938cb6eb75b23056d23a3bbc4e64b926 the check of `Equal()` function was moved under the `reflect.Struct` case. and here is an example why this is wrong: https://play.golang.org/p/AlgXufFrO1g ```golang package main import ( "fmt"...