pkg / expect

A simple assertion library that you probably shouldn't use.
BSD 2-Clause "Simplified" License
133 stars 4 forks source link

How to use with goconvey? #2

Closed fsyyft closed 4 years ago

fsyyft commented 4 years ago

Excuse me, I now use https://github.com/smartystreets/goconvey for unit testing, can I use it with this project? how to use? Thank you!

davecheney commented 4 years ago

I’m sorry I don’t use convey, I cannot tell you if it will work or not. I suggest you give it a try and see

fsyyft commented 4 years ago

Thank you very much for your reply!

I would like to ask you another question. Does using Runtime.stack to get Stack information in t.go. file consume more resources than passing values through functions?

I've tried using Runtime.stack to get the line number in the logging module before, and found that the benchmarking overhead was quite high.

Thank you very much!

davecheney commented 4 years ago

I’m sure it uses more resources than passing a testing.T. I encourage you to read the associated blog post https://dave.cheney.net/2019/12/08/dynamically-scoped-variables-in-go