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

c# port of the java version #34

Merged
merged 9 commits into from
Mar 5, 2023
Merged

Conversation

devel0
Copy link
Contributor

@devel0 devel0 commented Mar 4, 2023

This PR adds c# support for the miniball library.
Complete of unit tests ( 11 passed, 3 failed, 1 skipped ) like the Java implementation results, with an example like the c++ version and the Getting Started doc.

Copy link
Owner

@hbf hbf left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this contribution, this is great!

Feel free to add yourself to the acknowledgments section if you want: https://github.com/hbf/miniball#authors--acknowledgements

Regarding the unit tests, the three that fail succeed in Java, or what’s the context around these?

@devel0
Copy link
Contributor Author

devel0 commented Mar 4, 2023

Thanks you, I added to acknowledgements.

This happens from java test

cd java
mvn test

results

Failed tests:   test_cocircular_points_large_radius_2(com.dreizak.miniball.highdim.MiniballTest)
  test_simplex_10(com.dreizak.miniball.highdim.MiniballTest)
  test_simplex_15(com.dreizak.miniball.highdim.MiniballTest)

Tests run: 15, Failures: 3, Errors: 0, Skipped: 1

and corresponding c#

cd csharp
dotnet test

resulting

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:00.54]     test.MiniballTest.test_cocircular_points_large_radius_2 [FAIL]
[xUnit.net 00:00:00.55]     test.MiniballTest.test_schnarz [SKIP]
[xUnit.net 00:00:00.95]     test.MiniballTest.test_simplex_15 [FAIL]
[xUnit.net 00:00:00.97]     test.MiniballTest.test_simplex_10 [FAIL]
...
Failed!  - Failed:     3, Passed:    11, Skipped:     1, Total:    15, Duration: 703 ms - test.dll (net7.0)

details follows:

test_cocircular_points_large_radius_2

data

image

test_simplex_15

data

image

test_simplex_10

data

image

notes on how to debug test c#

prerequisites

open folder miniball then install suggested extensions Omnisharp then reload and answer yes to create default assets choosing example or test project ( this will create .vscode/tasks.json and .vscode/launch.json ); then open csharp/test/MiniballTest.cs and run tests using the codelen Debug All Tests

image

shortcuts:

  • F9 ( breakpoint )
  • F12 ( goto def )
  • F10 ( step over )
  • F11 ( step into )

@devel0
Copy link
Contributor Author

devel0 commented Mar 4, 2023

From what I can see on my side, for the purpose I used this port, it seems to work nicely, following a sample from an opensource project I'm working on about a multiplatform opengl toolkit, as can see the sphere contains the inner blue tube object:

image

@hbf
Copy link
Owner

hbf commented Mar 5, 2023

Ah, I see, they fail in Java as well. That definitely needs some cleanup/addressing some time but I don’t want you to be blocked by this.

Not sure you can merge, if not lmk when it’s ready from your side and I’ll merge.

@devel0
Copy link
Contributor Author

devel0 commented Mar 5, 2023

I have no more commit, for me it can be merged.
Thanks you.

@hbf hbf merged commit d3c3c96 into hbf:master Mar 5, 2023
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.

2 participants