4 ms·
I don't fully grok this logic. So if Google adds a test assertion framework to the stdlib, then you would recommend using because it is now "Go approved"? In th
by cmcginty 9y ago
I don't fully grok this logic. So if Google adds a test assertion framework to the stdlib, then you would recommend using because it is now "Go approved"? In that event nothing has changed other than where the code is coming from.
You can't reasonable say that both methods are equal. Would you still recommend the (if res != exp { t.Fatal(...)}) in this case? If "No", then doesn't that mean you actually prefer more complex assertion primitives?
Do you only use "if" test conditions in C, C++, Java, Python? Why or why not? If "No", why is it acceptable to use more code and logic just because you switched to Go?