Skip to content

Conversation

@benegee
Copy link
Collaborator

@benegee benegee commented Aug 15, 2023

Should at some point resolve #67

@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #78 (06ba468) into main (8a7ce01) will increase coverage by 0.65%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   95.88%   96.54%   +0.65%     
==========================================
  Files           8       12       +4     
  Lines         316      492     +176     
==========================================
+ Hits          303      475     +172     
- Misses         13       17       +4     
Flag Coverage Δ
unittests 96.54% <ø> (+0.65%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 4 files with indirect coverage changes

@benegee
Copy link
Collaborator Author

benegee commented Aug 17, 2023

Summary
Following julia code lines are not covered:

  • LibTrixi.jl: In show_debug_output(): other choices for LIBTRIXI_DEBUG
  • api_c.jl: all the *_cfptr() = @cfunction(*, Cvoid, (...)) are not detected
  • api_jl.jl: OrdinaryDiffEq integrator failing on doing a step
  • simulationstate.jl
    • store_simstate: maximum count exceed, getting already existing handle (both should be near impossible)
    • delete_simstate: strange, this should be tested...

@sloede
Copy link
Member

sloede commented Aug 17, 2023

  • LibTrixi.jl: In show_debug_output(): other choices for LIBTRIXI_DEBUG

Simple unit tests can help here.

  • api_c.jl: all the *_cfptr() = @cfunction(*, Cvoid, (...)) are not detected

You can just call them in unit tests and verify that they return pointers that are not null.

  • api_jl.jl: OrdinaryDiffEq integrator failing on doing a step
  • simulationstate.jl

Too hard to test. Just ignore it.

  • store_simstate: maximum count exceed, getting already existing handle (both should be near impossible)

Again, just ignore.

  • delete_simstate: strange, this should be tested...

Can't really tell why, just keep digging I guess?

@benegee
Copy link
Collaborator Author

benegee commented Aug 17, 2023

Thanks for the hints!

@benegee
Copy link
Collaborator Author

benegee commented Aug 24, 2023

All addressed. Except delete_simstste, which only gets called from trixi_finalize_simulation, which however will check the handle before via load_simstate.

@benegee benegee requested a review from sloede August 24, 2023 06:28
Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks already quite good - with the remaining convo resolved, this can be merged.

Nicely done, upping the test coverage of the LibTrixi.jl folder from 0% to 97%! 🙌

Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last suggestion, then this LGTM!

sloede
sloede previously approved these changes Aug 28, 2023
Copy link
Member

@sloede sloede left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great work!

@sloede sloede enabled auto-merge (squash) August 28, 2023 06:33
@sloede sloede disabled auto-merge August 28, 2023 07:36
@sloede sloede merged commit b721733 into main Aug 28, 2023
@sloede sloede deleted the bg/julia-test branch August 28, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Julia tests for LibTrixi.jl

2 participants