elliotchance / tf

✔️ tf is a microframework for parameterized testing of functions and HTTP in Go.
MIT License
137 stars 3 forks source link

Untyped nils need not cause a panic #5

Closed elliotchance closed 6 years ago

elliotchance commented 6 years ago

Untyped nils need to be cast, like:

MyFunction(nil).Returns("foo") // will not work
MyFunction((MyStruct*)(nil)).Returns("foo") // works

Internally it should determine and cast the correct type of nil so that the caller doesn't have to worry about this.

m1ome commented 6 years ago

This should be solved now, apart #11 (this one also handles nils in return statements)

m1ome commented 6 years ago

@elliotchance this this one is solved now 🎆

elliotchance commented 6 years ago

Thank you very much @m1ome !