-
Notifications
You must be signed in to change notification settings - Fork 14
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
Internal/assertions #529
Internal/assertions #529
Conversation
Most 'adiar_assert' into an if-throw statement for what is truly deemed checks on the user's input. To this end, we introduce <adiar/exception.h> with aliases of the std::exceptions. Later we can revisit these and change them into something more appropriate. Furthermore, all the debug-only macros have been combined into a simple 'adiar_debug' with variadic number of arguments.
This will make it much neater for unit testing, since it does not terminate on the first violation.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #529 +/- ##
=============================================
- Coverage 97.126% 97.094% -0.032%
=============================================
Files 82 82
Lines 5637 5644 +7
=============================================
+ Hits 5475 5480 +5
- Misses 162 164 +2
☔ View full report in Codecov by Sentry. |
Benchmark Report 🟢
Minimum running time (s) for 9-Queens:
|
Benchmark Report 🟢
Minimum running time (s) for 12-Queens:
|
Benchmark Report 🟢
Minimum running time (s) for 14-Queens:
|
Either all or nothing, this maybe just seems confusing
Benchmark Report 🟢
Minimum running time (s) for 9-Queens:
|
Benchmark Report 🟢
Minimum running time (s) for 14-Queens:
|
Benchmark Report 🟡
Minimum running time (s) for 12-Queens:
|
Partly based on the need to clean up the assertion mess, as was evident in #527 .
adiar_assert(...)
statements. Do one of the following twoadiar_debug(...)
.adiar_invariant
andadiar_precondition
into a variadicadiar_debug
.adiar_debug
intoadiar_assert
.adiar_assert
throw anadiar::assert_errror
instead of terminating.adiar_unreachable()
into its own header file.This closes #422.
Some input validation checks are not consistent from an end-users perspective.
bdd_from
andzdd_from
.