Skip to content

C API test using google test#80

Merged
sloede merged 28 commits intomainfrom
bg/gtest
Aug 24, 2023
Merged

C API test using google test#80
sloede merged 28 commits intomainfrom
bg/gtest

Conversation

@benegee
Copy link
Collaborator

@benegee benegee commented Aug 17, 2023

First part adressing #73

@codecov
Copy link

codecov bot commented Aug 17, 2023

Codecov Report

Merging #80 (231dc68) into main (e19b886) will increase coverage by 18.81%.
The diff coverage is 100.00%.

❗ Current head 231dc68 differs from pull request most recent head d89194d. Consider uploading reports for the commit d89194d to get more accurate results

@@             Coverage Diff             @@
##             main      #80       +/-   ##
===========================================
+ Coverage   77.07%   95.88%   +18.81%     
===========================================
  Files           8        8               
  Lines         314      316        +2     
===========================================
+ Hits          242      303       +61     
+ Misses         72       13       -59     
Flag Coverage Δ
unittests 95.88% <100.00%> (+18.81%) ⬆️

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

Files Changed Coverage Δ
examples/simple_trixi_controller.f90 100.00% <100.00%> (+29.41%) ⬆️
examples/trixi_controller_data.f90 100.00% <100.00%> (+26.31%) ⬆️
src/auxiliary.c 93.87% <100.00%> (+49.19%) ⬆️

... and 3 files with indirect coverage changes

@benegee
Copy link
Collaborator Author

benegee commented Aug 21, 2023

Coverage is rising 🥳

But, I do not know how to provoke this one:

libtrixi/src/auxiliary.c

Lines 116 to 120 in bb9582c

if (fptrs[i] == NULL) {
fprintf(stderr, "ERROR: could not get function pointer with `%s()`\n",
fptr_names[i]);
print_and_die("null pointer", LOC);
}

If a non-existing function pointer name is given, the execution of the julia command will already abort with an error message.

@sloede
Copy link
Member

sloede commented Aug 21, 2023

If a non-existing function pointer name is given, the execution of the julia command will already abort with an error message.

Yeah, this path you cannot easily check. Just leave it be for now.

@benegee benegee linked an issue Aug 22, 2023 that may be closed by this pull request
@benegee benegee marked this pull request as ready for review August 24, 2023 13:35
@benegee benegee requested a review from sloede August 24, 2023 13:36
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.

Just a few small comments, but otherwise this looks great!

@sloede
Copy link
Member

sloede commented Aug 24, 2023

More than 95% coverage 🥳

benegee and others added 2 commits August 24, 2023 16:19
Co-authored-by: Michael Schlottke-Lakemper <michael@sloede.com>
@benegee benegee requested a review from sloede August 24, 2023 16:21
@sloede sloede enabled auto-merge (squash) August 24, 2023 16:23
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 merged commit e88d502 into main Aug 24, 2023
@sloede sloede deleted the bg/gtest branch August 24, 2023 16:23
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.

Improve C interface tests

2 participants