-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add unit testing framework and tests for existing code (and assorted fixes and breaking API changes) #23
Add unit testing framework and tests for existing code (and assorted fixes and breaking API changes) #23
Conversation
Incomplete, blocked for test requirements from @adamhutchings for the matrix and vector classes. |
Are we merging this after #25? |
3c84251
to
f09d0d8
Compare
Is development on this able to proceed or are we still waiting on something else? |
Waiting on nothing, just time and writing tests. I think it would be interesting if we want to do test-driven development or behavior-driven development for v1 (i.e. draft the API, write all the tests, and once all tests pass v1 is complete). |
I think that is a worthwhile discussion to have, but if we have the basis of testing set up, we can probably close this PR and add more tests as they come (or however else we agree to do it). |
Blocked #38 |
i sure hope nothing else is missing and nothing else was messed up by the merge
…nd vector classes
…8-add-start-to-test-suite
TODO before this can be merged
|
C API is not tested. |
This comment was marked as outdated.
This comment was marked as outdated.
@adamhutchings @JakeRoggenbuck Ready to review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much appreciated!
REQUIRE(act.f(1) == 1); | ||
|
||
REQUIRE(act.df(-1) == 0); | ||
// REQUIRE(act.df(0) == 0); FIXME: is this UB? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is UB because we can just arbitrarily choose a value for the derivative. Like you chose to do, probably better not to test this because the behavior of the derivative at the discontinuity doesn't matter.
Using catch2 and integration with meson's testing harness (so tests can be run with
meson test
).