Conversation
Codecov Report
@@ Coverage Diff @@
## master #19 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 1 1
Lines 23 23
=====================================
Hits 23 23
Continue to review full report at Codecov.
|
Thanks for doing this! This is something I was meant to check this ever since I saw https://juliagpu.gitlab.io/CUDAnative.jl/man/hacking/#Generated-functions-1 (I don't know if it's an issue with CUDA yet, but why not make the body as pure as possible when we can.) |
|
An informative error message is great! Perhaps test the error message as well? |
| @test_throws ArgumentError setproperties(o, (a=2, c=3.0)) | ||
| @test_throws ArgumentError setproperties(o, a=2, c=3.0) | ||
| res = @test_throws ArgumentError setproperties(o, (a=2, this_field_does_not_exist=3.0)) | ||
| msg = sprint(showerror, res.value) |
There was a problem hiding this comment.
Is accessing the error object like this is considered a public API?
There was a problem hiding this comment.
I asked to make it so a while ago JuliaLang/julia#31854
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #19 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 23 23
=========================================
Hits 23 23 ☔ View full report in Codecov by Sentry. |
Also the body of
@generated setproperties(...)was impure as it was responsible for throwing the error. Not sure if this is a problem in practice, but it is forbidden in theory.