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

Improved cheeck-= and check-within error messages #166

Merged
merged 8 commits into from
Nov 4, 2023
Merged

Improved cheeck-= and check-within error messages #166

merged 8 commits into from
Nov 4, 2023

Conversation

matteo-daddio
Copy link
Contributor

Improved documentation and error messages of check-= and check-within as discussed in issue #165.

@sorawee
Copy link
Contributor

sorawee commented Nov 2, 2023

You said that the PR is intended to "Improved documentation", but I don't see the documentation change anywhere. Did you forget to commit some changes?

It would be nice to write tests to make sure that the message contains the added information. Probably here. If you don't want to do that, I can merge the PR now and work on the test as a separate change, too.

But this overall looks good. Thanks!

@matteo-daddio
Copy link
Contributor Author

Improved documentation and error messages of check-= and check-within as discussed in issue #165.

Added Avogadro constant and Gravity constant functions.
(check-within (list 6 10) (list 6.02 9.99) 0.05)
(check-within (flvector 3.0 4.0 5.0) (flvector 3.01 4.01 5.014) 0.02)
(check-within (hash 'C 20 'F 68) (hash 'C 25 'F 77) 10)
(check-within (list 6.02 9.99) (list 6 10) 0.05)
Copy link
Contributor

Choose a reason for hiding this comment

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

Here, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Corrected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that the tests are ok.

@sorawee
Copy link
Contributor

sorawee commented Nov 4, 2023

There are more changes I'd like to make, but they are just nits, so I'll go ahead and merge this, and make the change later. In particular, I'd like to keep similarity between "For example, the following checks pass:" and "And the following checks fail:" as much as possible, so that readers can contrast them easily. That means:

  • check-withinfor hash should have (hash 'C 25 'F 77) as the expected value.
  • check-within for list should have the same expected value.

@sorawee sorawee merged commit 525887f into racket:master Nov 4, 2023
2 checks passed
@matteo-daddio
Copy link
Contributor Author

matteo-daddio commented Nov 4, 2023 via email

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.

2 participants