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

increase test coverage of metadata DebugUtils #616

Closed
wants to merge 13 commits into from

Conversation

tcoratger
Copy link
Collaborator

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.

@codecov-commenter
Copy link

codecov-commenter commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.42%. Comparing base (44d4208) to head (a09adcf).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #616      +/-   ##
==========================================
+ Coverage   88.76%   90.42%   +1.66%     
==========================================
  Files         121      121              
  Lines       35627    36263     +636     
==========================================
+ Hits        31624    32791    +1167     
+ Misses       4003     3472     -531     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Oppen
Copy link
Contributor

Oppen commented Jun 15, 2024

Two things:

  1. Most of the comments in the tests are superfluous, I'd rather keep the tests compact unless the comments actually clarify something;
  2. The tests seem to test code generation is successful, but not the behavior of that code.

What I would expect from these tests is this:

  1. They do test code generation.
  2. They test the generated code behaves as expected (that is, a print writes to stdout, maybe check if you can override it with a buffer).
  3. The active_map actually fits its purpose: we need to see both that:
  • It doesn't have the function marked as active before calling code generation.
  • The symbol is not emitted if we don't call that function.
  • It marks the function as active afterwards.
  • Successive calls don't emit the symbols twice.

azteca1998
azteca1998 previously approved these changes Aug 27, 2024
Copy link
Collaborator

@azteca1998 azteca1998 left a comment

Choose a reason for hiding this comment

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

This module is for debugging, and it's not intended to even be compiled in normal builds so there's no need to test it more than we already do every time we need to use it. That said, any extra testing is appreciated.

@edg-l
Copy link
Member

edg-l commented Oct 2, 2024

The debug utils module is only used when debugging bugs internally in cairo native, as @azteca1998 pointed out I also don't think the tests are necesary for now

@edg-l edg-l closed this Oct 2, 2024
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.

6 participants