Skip to content

Improve tests for UUID V4 generation in spinoso-securerandom #2599

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

Merged
merged 1 commit into from
Jun 11, 2023

Conversation

lopopolo
Copy link
Member

Add tests for the following invariants:

  • UUIDs have the correct length.
  • UUIDs are V4.
  • UUIDs have hyphens in the right place.
  • UUIDs are all lower ASCII hex digits.
  • UUIDs are all unique.
  • UUIDs are all ASCII characters.
  • UUIDs properly set clock_seq_hi_and_reserved bits.

More fun pair programming with ChatGPT.

Add tests for the following invariants:

- UUIDs have the correct length.
- UUIDs are V4.
- UUIDs have hyphens in the right place.
- UUIDs are all lower ASCII hex digits.
- UUIDs are all unique.
- UUIDs are all ASCII characters.
- UUIDs properly set `clock_seq_hi_and_reserved` bits.

More fun pair programming with ChatGPT.
@lopopolo lopopolo added A-ruby-stdlib Area: Ruby Standard Library packages. C-quality Category: Refactoring, cleanup, and quality improvements. labels Jun 11, 2023
@lopopolo lopopolo merged commit f879aaa into trunk Jun 11, 2023
@lopopolo lopopolo deleted the lopopolo/securerandom-uuid-tests branch June 11, 2023 06:41
@lopopolo lopopolo changed the title Improve tests for UUID V4 generation in spinoso-random Improve tests for UUID V4 generation in spinoso-securerandom Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ruby-stdlib Area: Ruby Standard Library packages. C-quality Category: Refactoring, cleanup, and quality improvements.
Development

Successfully merging this pull request may close these issues.

1 participant