Skip to content

Conversation

@haraldmaida
Copy link
Member

Often the easiest way to assert a custom type is to write a helper function that asserts each part of the type reusing existing assertions.

Added the example assertion_function.rs to demonstrate how to write a helper function to assert the fields of a custom struct reusing existing assertions.

@haraldmaida haraldmaida self-assigned this Nov 9, 2025
@haraldmaida haraldmaida added the documentation Improvements or additions to documentation label Nov 9, 2025
@codecov
Copy link

codecov bot commented Nov 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.95%. Comparing base (1b7603d) to head (f1f3572).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #67   +/-   ##
=======================================
  Coverage   93.95%   93.95%           
=======================================
  Files          32       32           
  Lines        4463     4463           
  Branches     4463     4463           
=======================================
  Hits         4193     4193           
  Misses        233      233           
  Partials       37       37           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@haraldmaida haraldmaida merged commit 28d215f into main Nov 9, 2025
20 checks passed
@haraldmaida haraldmaida deleted the doc/helper-function-asserting-custom-type branch November 9, 2025 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants