-
Notifications
You must be signed in to change notification settings - Fork 182
Added property checks for lollipop graph #1453
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
Added property checks for lollipop graph #1453
Conversation
Added a test using QuickCheck to verify that the lollipop_graph generator produces graphs with the correct number of nodes and edges based on the input sizes of the mesh and path. Updated the Cargo.toml to add dependecies and test target.
Hey @IvanIsCoding, right now I have added quickcheck in the tests folder as it is similar to unit and integration tests with the same command. Should we keep it there or move it in a different folder like fuzzing? |
Pull Request Test Coverage Report for Build 15331993229Details
💛 - Coveralls |
I will take a look at this today or tomorrow. But for location, I think a |
rustworkx-core/Cargo.toml
Outdated
@@ -25,3 +25,9 @@ rand_distr.workspace = true | |||
rand_pcg.workspace = true | |||
rayon.workspace = true | |||
rayon-cond = "0.4" | |||
quickcheck = "1.0" |
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.
Please list it as a development dependency: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies.
This will prevent end-users from importing a test library.
rustworkx-core/Cargo.toml
Outdated
quickcheck = "1.0" | ||
quickcheck_macros = "1.0" | ||
|
||
[[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.
I am now sure how necessary this is? https://doc.rust-lang.org/rust-by-example/testing/integration_testing.html#integration-testing
I hope cargo test
just automatically finds this.
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.
Its not picking it up if I create the file inside the quickcheck folder.
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.
Try adding a main.rs file like https://github.com/Qiskit/rustworkx/blob/408397f10f6a0164dc117f1e3f6415ad1251ef5d/rustworkx-core/tests/graph_ext/main.rs
Added a test using QuickCheck to verify that the lollipop_graph generator produces graphs with the correct number of nodes and edges based on the input sizes of the mesh and path.
Updated the Cargo.toml to add dependecies and test target.