bnagy / gapstone

gapstone is a Go binding for the capstone disassembly library
Other
151 stars 43 forks source link

write spec we got on disk so it can be compared with the expected #8

Closed StalkR closed 10 years ago

StalkR commented 10 years ago

While working on https://github.com/bnagy/gapstone/pull/7 and running "go test .", it was not easy to read the test output because of the fmt.Println(fs) statements. Also, I felt it was easier to have the the spec we got written to disk in case of failure, so it can be diffed and moved to replace the expected.

bnagy commented 10 years ago

Thanks for your work! I'm about to do the 3.0 changes today, so I'm not going to pull these in. The idea with the tests is that when they fail they dump the to stdout and you compare with -run FailTest and | diff - failiing_test.SPEC ( to diff from stdout ) which saves cluttering up the source dir. Usually I only uncomment that dump for tests that are actively failing, but I guess I left them live.