Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offer verbose and terse versions of AUnit.h #8

Closed
bxparks opened this issue Mar 29, 2018 · 0 comments
Closed

offer verbose and terse versions of AUnit.h #8

bxparks opened this issue Mar 29, 2018 · 0 comments

Comments

@bxparks
Copy link
Owner

bxparks commented Mar 29, 2018

Current version leaves out the lhs and rhs strings of various assertXxx() statements, saving about 30-50% flash memory compared to ArduinoUnit. But these strings are actually very useful for debugging. Considering adding them back in, but offer 2 headers for the end-user:

  • AUnit.h (contains lhs and rhs strings)
  • AUnitTiny.h (AUnitShort.h, AUnitTerse.h?), which don't have these strings

Since these assertXxx() methods are actually#define macros, it should be possible to allow the user to select the version at compile time, and the linker should remove all the methods which aren't used by the given program. This allows the user to choose to pay for the flash memory or not, depending on the project. (Many of my unit tests hit close to 30kB even without the lhs and rhs strings).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant