autogold icon indicating copy to clipboard operation
autogold copied to clipboard

Automatically update your Go tests

Results 19 autogold issues
Sort by recently updated
recently updated
newest added

I think we can eliminate the need for supplying a unique name to `autogold.Want` by instead using the call stack information, i.e. since Go programs embed debugging information we know...

v2

I think `-update-only` may be a lot faster in general because it doesn't need to shuffle files around in order to remove unused `.golden` files (although that _should_ be fairly...

v2

See this example: ``` tests := []struct { name string want autogold.Value }{ {name: "good", want: autogold.Want("good", []A{A{ A: valast.Addr("abc").(*string), B: "def", C: valast.Addr(false).(*bool), D: valast.Addr(true).(*bool), }})}, } ``` `[]A{A{`...

valast

A small example: A slice got wraps the want-struct on each comma, ``` tests := []struct { name string want autogold.Value }{ {name: "good", want: autogold.Want("good", []A{A{ A: valast.Addr("abc").(*string), B:...

valast

Thank you so much for writing this utility ! I have a field in my struct that is transient. Meaning it gets generated from random values. I don't want to...

I got this result when running with `-update` flag: ![image](https://github.com/hexops/autogold/assets/1061610/f9f76777-b381-4cb1-a060-bd9cd6791f8b) one of them generated with `"` the other one with backtick, is there a way to make it consistent one...

Right now the generated assertions for some pointer types use `valast.Addr` to get an `interface{}` that then gets cast back into the desired type. It's quite a lot of casting...

Background: saving to database and generating the result giving different diff because of timezone difference minimal code to reproduce: ```go package foo import "time" import "github.com/hexops/autogold" import "testing" func TestFoo(t...

valast

When a codebase has packages that do not use `autogold`, running `go test ./... -update` causes the test run to fail with a usage message. The usage message is shown...