Add overload for assert functions for unit test#28341
Conversation
Signed-off-by: stoutes <31317041+stoutes@users.noreply.github.com>
Signed-off-by: stoutes <31317041+stoutes@users.noreply.github.com>
Signed-off-by: stoutes <31317041+stoutes@users.noreply.github.com>
Signed-off-by: stoutes <31317041+stoutes@users.noreply.github.com>
Signed-off-by: stoutes <31317041+stoutes@users.noreply.github.com>
There was a problem hiding this comment.
Have you tested this with start_test test/library/packages/UnitTest/assertWithArgs.chpl? It doesn't look as if this good file will pass?
regardless, while these tests are fine and should be kept, I think you should also expand tests in test/library/packages/UnitTest/Assert*/*.chpl tests to include your new overloads, as those are more exhaustive in terms of types passed.
There was a problem hiding this comment.
So I re-did the good file, compiled and ran the test, and it showed a pass.
Signed-off-by: stoutes <31317041+stoutes@users.noreply.github.com>
8d431e2 to
03bf8c0
Compare
Signed-off-by: stoutes <31317041+stoutes@users.noreply.github.com>
Signed-off-by: stoutes <31317041+stoutes@users.noreply.github.com>
jabraham17
left a comment
There was a problem hiding this comment.
Looks good! Other than a few nits I left this is pretty much ready to go. I would still strongly like to see more test cases added in test/library/packages/UnitTest/Assert*/*.chpl.
Make sure to fix the DCO for one of the commits or I won't be able to merge this.
880e074. If you need help, see https://chapel-lang.org/docs/main/developer/bestPractices/DCO.html#troubleshooting-dcos
| } catch e: AssertionError { | ||
| var msg = e.message() + " - " + chpl_stringify_wrapper((...args)); | ||
| throw new owned AssertionError(msg); | ||
| } |
There was a problem hiding this comment.
this is still not indented right
There was a problem hiding this comment.
Noting this is not resolved, the indentation is still wrong
I'll just add those test files in with this MR. Working on them right now. |
Resolves #28311
This feature adds the overloads for assert functions:
This will allow additional args on an assert failure to be printed.
Also added unit test files in UnitTest.