AdvancedDLSupport
AdvancedDLSupport copied to clipboard
Add interface-wide default calling convention
NativeSymbolsAttribute updated to have a specifiable interface-wide calling convention, along with internal logic to accommodate.
Codecov Report
Merging #87 into master will decrease coverage by
0.09%. The diff coverage is61.11%.
@@ Coverage Diff @@
## master #87 +/- ##
=========================================
- Coverage 89.44% 89.35% -0.1%
=========================================
Files 114 114
Lines 5516 5532 +16
Branches 456 461 +5
=========================================
+ Hits 4934 4943 +9
- Misses 576 583 +7
Partials 6 6
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ransformation/Attributes/NativeSymbolsAttribute.cs | 44.44% <ø> (ø) |
:arrow_up: |
| ...cedDLSupport/Reflection/IntrospectiveMemberBase.cs | 75% <61.11%> (-4.17%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 7ab2c03...e238fce. Read the comment docs.
Codecov Report
Merging #87 into master will decrease coverage by
2.26%. The diff coverage is100%.
@@ Coverage Diff @@
## master #87 +/- ##
==========================================
- Coverage 89.09% 86.83% -2.27%
==========================================
Files 115 116 +1
Lines 5642 5584 -58
Branches 497 463 -34
==========================================
- Hits 5027 4849 -178
- Misses 604 717 +113
- Partials 11 18 +7
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...ancedDLSupport/Attributes/NativeSymbolAttribute.cs | 100% <ø> (ø) |
:arrow_up: |
| ...ransformation/Attributes/NativeSymbolsAttribute.cs | 44.44% <ø> (ø) |
:arrow_up: |
| ...cedDLSupport/Reflection/IntrospectiveMemberBase.cs | 80% <100%> (-0.56%) |
:arrow_down: |
| ....Tests/Tests/Integration/CallingConventionTests.cs | 100% <100%> (ø) |
|
| AdvancedDLSupport/Loaders/LinuxPlatformLoader.cs | 0% <0%> (-100%) |
:arrow_down: |
| AdvancedDLSupport/Loaders/BSDPlatformLoader.cs | 0% <0%> (-100%) |
:arrow_down: |
| AdvancedDLSupport/Loaders/Native/dl.cs | 5.88% <0%> (-82.36%) |
:arrow_down: |
| AdvancedDLSupport/Loaders/UnixPlatformLoader.cs | 10.81% <0%> (-78.38%) |
:arrow_down: |
| ...vancedDLSupport/PathResolvers/MacOSPathResolver.cs | 16.66% <0%> (-58.34%) |
:arrow_down: |
| ...vancedDLSupport/PathResolvers/LinuxPathResolver.cs | 20% <0%> (-42.86%) |
:arrow_down: |
| ... and 14 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update dd003ff...df98ed7. Read the comment docs.
So based on some of the discussions on github, here's an outline of the test cases that need to be implemented:
Case 1
- Interface only
- Single method without explicit calling convention
- Calling convention set in NativeSymbols attribute on the interface
Expected Results
Method uses the calling convention from the NativeSymbols attribute and can be successfully called.
Case 2
- Interface only
- Two methods
- Method one does not have an explicit calling convention set
- Method two has an explicit calling convention set via a NativeSymbol attribute
Expected Results
Method one uses the calling convention from the NativeSymbols attribute. Method two uses the calling convention set in its specific NativeSymbol attribute.
Case 3
- Mixed-mode class
- Multiple interface implementation
- Interface one has a NativeSymbols attribute
- Interface two does not
Expected Results
Methods from interface one uses the calling convention from the NativeSymbols attribute on their interface. Methods from interface two does not.
Case 4
- Mixed-mode class
- Multiple interface implementation
- Interface one has a NativeSymbols attribute
- Interface two has a NativeSymbols attribute with a different calling convention.
Expected Results
Methods from interface one uses the calling convention from the NativeSymbols attribute on their interface. Methods from interface two uses the calling convention from the NativeSymbols attribute on their interface.
Can you rebase this on master and ensure the tests pass before I review it?