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

Proposal: Add a quick summary of the prefixes to the docs #261

Open
RichardJActon opened this issue Apr 17, 2024 · 0 comments
Open

Proposal: Add a quick summary of the prefixes to the docs #261

RichardJActon opened this issue Apr 17, 2024 · 0 comments

Comments

@RichardJActon
Copy link

I tend to forget what the different prefixes mean when I've not been using the library for a while and whenever I go to double check them it takes me a moment to parse through this section of the intro page: https://mllg.github.io/checkmate/articles/checkmate.html#function-overview

I think it would be helpful to have a quick at-a-glance reference for what the different prefixes mean, perhaps as a subsection of function overview?

Here's what I'd suggest - just slightly re-wording/restructuring what's already there to make it more succinct, separate it from the camelcase vs snakecase stuff and emphasize the important differences.

Checkmate Function Prefixes Summary

  • assert*
    If prefixed with assert, an error is thrown if the corresponding check fails.
    Otherwise, the checked object is returned invisibly.
  • test*
    The test family always return the check result as logical value.
  • check*
    Functions starting with check return the error message as a string (or TRUE otherwise) and can be used if you need more control and, e.g., want to grep on the returned error message.
  • expect*
    The expect family is intended to be used with the {testthat} package.
    All performed checks are logged into the testthat reporter.

Thanks for checkmate it's incredibly useful!

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

No branches or pull requests

1 participant