SwiftCheck icon indicating copy to clipboard operation
SwiftCheck copied to clipboard

Adds ability to generate arbitrary `Date`s and `UUID`s

Open svdo opened this issue 5 years ago • 1 comments

What's in this pull request?

I added definitions of arbitrary for the Date and UUID foundation types. I also included unit tests for both.

Why merge this pull request?

I believe these two generators are useful to may people, and especially the UUID generator is not trivial as it required me to study RFC 4122 and implement the UUID v4 spec.

What's worth discussing about this pull request?

  • I created a new test file for this. Not sure if that's what you want, or if you prefer to put it somewhere else.
  • I also included two Data utility functions for hex encoding. Those are also highly generic but not easy to find currently. Not sure if that's a problem or not.

What downsides are there to merging this pull request?

None that I can think of.

svdo avatar Jun 29 '20 15:06 svdo

Please note that the build is passing, just the reporting back to this pull request doesn't seem to work...?

https://travis-ci.org/github/typelift/SwiftCheck/builds/703270249

svdo avatar Jun 29 '20 19:06 svdo