-
Notifications
You must be signed in to change notification settings - Fork 105
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
update fuzztest #1112
base: master
Are you sure you want to change the base?
update fuzztest #1112
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1112 +/- ##
==========================================
+ Coverage 91.46% 91.54% +0.07%
==========================================
Files 30 30
Lines 5908 5904 -4
==========================================
+ Hits 5404 5405 +1
+ Misses 504 499 -5 ☔ View full report in Codecov by Sentry. |
OK managed to get a simple self-intersection example... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
test/manifold_fuzz.cpp
Outdated
case Transform::Scale: | ||
cube = cube.Scale({std::get<0>(transform.second), | ||
std::get<1>(transform.second), | ||
std::get<2>(transform.second)}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might this be simpler if we just use cube.Transform
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using three different transforms to try to get the fuzzer to produce something that is simpler. We can look into that later after the current issue is fixed, I guess.
} | ||
} | ||
|
||
FUZZ_TEST(ManifoldFuzz, SimpleCube).WithDomains(CsgDomain); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this use the same random seed every time or different? If it fails, will it spit out all the info we need to create a deterministic test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is different every time, but we can override that to replay the fuzzing process. It will spit out the info needed for the test when using the minimizer script, I will document it.
add_executable(manifold_fuzz manifold_fuzz.cpp) | ||
target_link_libraries(manifold_fuzz PUBLIC manifold) | ||
link_fuzztest(manifold_fuzz) | ||
gtest_discover_tests(manifold_fuzz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to enable MANIFOLD_FUZZ
on the CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is something that runs indefinitely, and non-deterministically. So this is probably something we want to run in our own machines.
test/boolean_test.cpp
Outdated
@@ -421,3 +421,15 @@ TEST(Boolean, Precision2) { | |||
cube2 = cube2.Translate(vec3(scale * kPrecision)); | |||
EXPECT_FALSE((cube ^ cube2).IsEmpty()); | |||
} | |||
|
|||
TEST(Boolean, SimpleCubeRegression) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elalish it is now here.
It seems that it now builds fine with the latest version of fuzztest.