Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

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

Merged
lopopolo merged 1 commit into
trunkfrom
lopopolo/securerandom-uuid-tests
Jun 11, 2023
Merged

lopopolo merged 1 commit into
trunkfrom
lopopolo/securerandom-uuid-tests

Conversation

@lopopolo

Copy link
Copy Markdown
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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