Feature: Allow to detect other Assert functions
trice/internal/id/helper.go:
99: baseTricePattern := `(?i)\bTRICE(?:0|_0|AssertTrue|AssertFalse|(?:8|16|32|64)*(?:_*[0-9SNBF]*)*)`
would you allow any type of Assert* so developers can customize its functions? (and still use Trice)
I made a pull request, what do you think? I added some utility assert functions and it allow users to future extend to their own versions
Please tell a bit about the use case you need. Best with examples.
I implemented the other use cases I was looking to me on the PR: https://github.com/rokath/trice/pull/585/files
The tool will match matches all kind of triceAssert*
So I can have now : triceAssertFail (which is basically a report of a ID .. something like Trice0) and also:
#define triceAssertOrReturn(a, b, c) do {if (!(c)) {triceAssertFail(a); return;}} while(0)
#define triceAssertOrReturnValue(a, b, c, v) do {if (!(c)) {triceAssertFail(a); return (v);}} while(0)
Please see my comment in the closed PR 585. Looking forward for an update.
Thanks, this looks good! 👍 You (probaly) forgot to remove #define triceAssertFail(...) ... in triceOff.h I will fix that.