Skip to content

Conversation

Krishn1412
Copy link
Contributor

Added a fuzz target for random graph generator with max edges.

Added a fuzz target for random graph generator with max edges.
@coveralls
Copy link

coveralls commented Apr 11, 2025

Pull Request Test Coverage Report for Build 14514959540

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 95.382%

Totals Coverage Status
Change from base Build 14514853196: 0.01%
Covered Lines: 18653
Relevant Lines: 19556

💛 - Coveralls

@IvanIsCoding
Copy link
Collaborator

I will review this later, but #1423 is a good candidate to be included when it is submited.

And as I said in #1429, I really like this.

input.seed,
|| (),
|| (),
) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Some other interesting check that we can have is that calling the method twice with the same seed generates that same graph i.e. the nodes and edges are all the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes that sounds like a good idea, I'll add and push that test too.

Copy link
Collaborator

@IvanIsCoding IvanIsCoding left a comment

Choose a reason for hiding this comment

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

Just leaving the comment to have a check where we call gnm_random_graph with the same seed and assert it is the same graph.

Hopefully that it is the current behavior. If it fails, let me know

Krishn1412 and others added 4 commits April 15, 2025 16:43
@IvanIsCoding
Copy link
Collaborator

Thanks for fixing the linting issues, I will merge now

@IvanIsCoding IvanIsCoding added this pull request to the merge queue Apr 17, 2025
Merged via the queue into Qiskit:main with commit 487c1f6 Apr 17, 2025
31 checks passed
SILIZ4 pushed a commit to SILIZ4/rustworkx that referenced this pull request Jul 4, 2025
* Adding Fuzz targets for random graph generator

Added a fuzz target for random graph generator with max edges.

* Updates based on comments

Added another test to check determinism (if same graph is returned for the same seed).

* fixing lint issues

* Removing unused imports

---------

Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com>
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.

3 participants