gotests
gotests copied to clipboard
gotests generate test names with MixedCaps
Change the gotests TestName function to follow the effective Go guide of MixedCaps.
This tool generates code that does not follow the Go effective style guide.
In this change we only change the TestName from adding _ to returning the Title version of the string that was intended for the test name. This give a MixedCaps test name.
Another angle would be to add a func to the Templates FuncMap to allow custom templates to replace the _s and Title the string in the template. This seems like a change that would best be default since it is following the effective Go guide.
Coverage decreased (-0.02%) to 96.339% when pulling 974312fe12e326276d09f405f3491c3a3e0eca4a on jeffbean:test-mixedcaps into c51312f508e7040f06d1eb174da68364155b1fc0 on cweill:master.
You should contribute to the discussion at https://github.com/golang/go/issues/33688. We should get consensus from the Go community about how to best generate tests like these.