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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# DevTesting Changelog

## 1.5.0: October 22, 2025

The `Date.random(in:using:)` functions now use `BinaryFloatingPoint.randomPrintable(in:using:)` to
generate time intervals. This should lead to greater reliability when converting the time intervals
of generated dates into strings.


## 1.4.0: October 12, 2025

`Stub` and `ThrowingStub` now conform to `Observable`. The only property that is tracked is
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 @@ -21,7 +21,7 @@ extension Date {
let lowerBound = range.lowerBound.timeIntervalSinceReferenceDate
let upperBound = range.upperBound.timeIntervalSinceReferenceDate
return Date(
timeIntervalSinceReferenceDate: .random(
timeIntervalSinceReferenceDate: .randomPrintable(
in: lowerBound ..< upperBound,
using: &generator
)
Expand All @@ -42,7 +42,7 @@ extension Date {
let lowerBound = range.lowerBound.timeIntervalSinceReferenceDate
let upperBound = range.upperBound.timeIntervalSinceReferenceDate
return Date(
timeIntervalSinceReferenceDate: .random(
timeIntervalSinceReferenceDate: .randomPrintable(
in: lowerBound ... upperBound,
using: &generator
)
Expand Down