nanoprintf icon indicating copy to clipboard operation
nanoprintf copied to clipboard

Clean up macros

Open stefano-zanotti-88 opened this issue 7 months ago • 4 comments

This changes some NANOPRINTF macros to NPF, so that now a macro is a user-customizable option iff it is a NANOPRINTF one, whereas all the NPF ones are for private use (or guards). Of course, functions/types/etc. are still prefixed with npf.

stefano-zanotti-88 avatar May 23 '25 16:05 stefano-zanotti-88

The presubmit checks fail because the tests still rely on the original macros. Let me know if you like this change, and I'll fix them (but, can I commit changes in paland.cc?)

stefano-zanotti-88 avatar May 23 '25 17:05 stefano-zanotti-88

I think in overhauling the testing infrastructure, I will rewrite the paland tests without copying them, so all of this will live in one repo without having to tiptoe around the incompatible licenses. This is a good PR, thanks for doing it; I'll copy it over into a new PR that I do and link to this one, so that I can do the paland fixup.

charlesnicholson avatar May 25 '25 23:05 charlesnicholson

Implemented in https://github.com/charlesnicholson/nanoprintf/pull/339

charlesnicholson avatar May 25 '25 23:05 charlesnicholson

Regarding paland, maybe you want to rewrite a similar test suite, or maybe you might use some or all of the "exhaustive testing" and/or "fuzz testing" I've proposed here: #343. Note that "exhaustive" means testing all possible combinations of specifiers/options, so as to catch edge cases, but it does not mean checking other things that are more important -- like using multiple specifiers in the same call, or various cases of float precision, or cases that are known to be tricky for proper rounding, etc. So, a lot of hand-crafted tests are still needed. Having all these interesting cases combined with all possible combinations of options would be infeasible -- there could easily be billions of test cases.

stefano-zanotti-88 avatar May 26 '25 18:05 stefano-zanotti-88