-
Notifications
You must be signed in to change notification settings - Fork 144
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 checkVector test helper equivalent to checkMatrix, NativePrint for std::unordered_map and std::array #5293
base: develop
Are you sure you want to change the base?
Conversation
{ | ||
bool result; | ||
std::string result_message; | ||
}; |
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.
Can we use empty return error_message
for pass instead of this two element struct? Just return the error_string.
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.
Did you miss this one?
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'm not a big fan of check for null as success semantics and this turns out quite readable with the catch macros for checkMatrix. I want this to have the same semantics. See: test_ConstantSPOSet.cpp, test_cuBLAS_LU.cpp, test_spline_applyrotation.cpp, etc.
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.
The current CheckXXXResults is not concise.
If results=true, it is unclear what non-empty result_message should be used for or should I care?
If results=false, but results_message is empty. Should I concerned about an empty result_message? Is that a bug?
I don't like undefined behvaviors.
A single string is neat. If empty, pass. If non-empty, error info is given.
Do you have good ways to prevent any UB with CheckXXXResults?
test this please |
52acdd8
to
b802536
Compare
Expanded Utilities/for_testing.
Proposed changes
See title
Incoming PR's will have tests that use these and provide coverage.
What type(s) of changes does this code introduce?
Delete the items that do not apply
Does this introduce a breaking change?
What systems has this change been tested on?
Checklist