Skip to content
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

Test functionality of automatic conversion in ccall #11

Merged
merged 1 commit into from
Nov 11, 2022
Merged

Conversation

jmert
Copy link
Owner

@jmert jmert commented Nov 11, 2022

This adds tests for the cconvert method used implicitly during ccalls. When designing the tests, though, it became obvious that real-world conversion to Cint arguments (such as calls to mmap in UnixMmap.jl) weren't covered by the existing method.

Change the behavior to allow for conversion to any integer type which can be represented by the destination type.

This adds tests for the `cconvert` method used implicitly during
`ccall`s. When designing the tests, though, it became obvious that
real-world conversion to `Cint` arguments (such as calls to `mmap`
in UnixMmap.jl) weren't covered by the existing method.

Change the behavior to allow for conversion to any integer type which
can be represented by the destination type.
@codecov
Copy link

codecov bot commented Nov 11, 2022

Codecov Report

Merging #11 (16ba320) into master (2378d5d) will increase coverage by 0.65%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           master       #11      +/-   ##
===========================================
+ Coverage   99.34%   100.00%   +0.65%     
===========================================
  Files           1         1              
  Lines         153       153              
===========================================
+ Hits          152       153       +1     
+ Misses          1         0       -1     
Impacted Files Coverage Δ
src/BitFlags.jl 100.00% <100.00%> (+0.65%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jmert jmert merged commit ff54656 into master Nov 11, 2022
@jmert jmert deleted the cconvert branch November 11, 2022 20:33
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.

1 participant