TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Comparison of Assertion Libraries

17 pointsby nfrankelabout 6 years ago

1 comment

zapharabout 6 years ago
I have a possibly unpopular opinion that assertion libraries that depend on throwing exceptions are bad API design for unit testing. Mainly because most test functions end up with multiple assertions in them and exceptions abort the test function early.<p>Many times understanding what causes a unit test failure is easier to debug if you can see the rest of the unit tests all at once.<p>I much prefer testing frameworks that use simple true&#x2F;false tests and not exceptions like Go&#x27;s unit testing library or Perl&#x27;s TAP library.
评论 #19539521 未加载