Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ DevTesting is a small Swift 6 package that contains useful additions for writing
Testing](https://github.com/swiftlang/swift-testing/).

- `SeedableRandomNumberGenerator` is a random number generator that can be seeded to enable
repeatable tests with random data.
repeatable tests with random values.
- `RandomValueGenerating` uses a seedable random number generator to repeatably generate values in
your test suite. It logs the seed before every test so that you can debug tests that failed. It
also includes convenient functions for generating random data:
also includes convenient functions for generating random values:
- Booleans
- Case iterables
- Data
- Dates
- Floating point types
- Integer types
- Optionals
Expand Down
1 change: 1 addition & 0 deletions Sources/DevTesting/Documentation.docc/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ over how its dependencies behave and providing detailed information about how th
- ``Swift/BinaryFloatingPoint``
- ``Swift/CaseIterable``
- ``Foundation/Data``
- ``Foundation/Date``
- ``Swift/Optional``
- ``Swift/String``
- ``Foundation/URL``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
- ``randomElement(in:)``


### Dates

- ``defaultClosedDateRange``
- ``randomDate(in:)-(ClosedRange<Date>?)``
- ``randomDate(in:)-(Range<Date>)``


### Numeric Types

- ``randomFloat64(in:)-(Range<Float64>)``
Expand Down
4 changes: 2 additions & 2 deletions Sources/DevTesting/Random Value Generation/Date+Random.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation

extension Date {
/// Returns a random date in the specified range.
/// Returns a random date in the specified half-open range.
///
/// - Parameters:
/// - range: The closed range in which to create a random value. `range` must not be empty.
Expand All @@ -29,7 +29,7 @@ extension Date {
}


/// Returns a random date in the specified range.
/// Returns a random date in the specified closed range.
///
/// - Parameters:
/// - range: The half-open range in which to create a random value.
Expand Down