Skip to content

Commit

Permalink
[Tests] Rework of BinaryInteger+Shift.swift (#108) (#110).
Browse files Browse the repository at this point in the history
Lots and lots and lots and lots and lots and lots and lots of fuzzing.
  • Loading branch information
oscbyspro committed Oct 26, 2024
1 parent aee0cb8 commit ea04741
Show file tree
Hide file tree
Showing 6 changed files with 521 additions and 706 deletions.
28 changes: 14 additions & 14 deletions Sources/TestKit2/Utilities+Reduce.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@
// MARK: * Utilities x Reduce
//*============================================================================*

@inlinable public func reduce<T>(
_ transform: (consuming T) throws -> T,
_ rhs: T
) rethrows -> T {
@inlinable public func reduce<A, B>(
_ transform: (consuming A) throws -> B,
_ rhs: A
) rethrows -> B {
try transform(rhs)
}

@inlinable public func reduce<T>(
_ lhs: consuming T,
_ transform: (consuming T, borrowing T) throws -> T,
_ rhs: borrowing T
) rethrows -> T {
@inlinable public func reduce<A, B, C>(
_ lhs: consuming A,
_ transform: (consuming A, borrowing B) throws -> C,
_ rhs: borrowing B
) rethrows -> C {
try transform(lhs, rhs)
}

@inlinable public func reduce<T>(
_ lhs: consuming T,
_ transform: (inout T, borrowing T) throws -> Void,
_ rhs: borrowing T
) rethrows -> T {
@inlinable public func reduce<A, B>(
_ lhs: consuming A,
_ transform: (inout A, borrowing B) throws -> Void,
_ rhs: borrowing B
) rethrows -> A {
try transform(&lhs, rhs)
return lhs
}
68 changes: 0 additions & 68 deletions Tests/CoreKitTests/CoreInt+Shift.swift

This file was deleted.

131 changes: 0 additions & 131 deletions Tests/DoubleIntKitTests/DoubleInt+Shift.swift

This file was deleted.

Loading

0 comments on commit ea04741

Please sign in to comment.