A collection of tools for debugging, diffing, and testing your application's data structures.
Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/0.11.1...0.11.2
_CustomDiffObject
now supports value types by providing an object identifier (https://github.com/pointfreeco/swift-custom-dump/pull/111).diff
output (https://github.com/pointfreeco/swift-custom-dump/pull/111).swiftwasm/setup-swiftwasm
instead of swiftwasm/swiftwasm-action
(thanks @kateinoigakukun, https://github.com/pointfreeco/swift-custom-dump/pull/113).Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.2.1...1.3.0
Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.2.0...1.2.1
Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.1.2...1.2.0
Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.1.1...1.1.2
Fixed: Filter properties prefixed with _$
(https://github.com/pointfreeco/swift-custom-dump/pull/100).
Macros like @Observable
can insert properties prefixed by _$
to a structure. Generally these kinds of properties should be thought of as implementation details and should be filtered from the dump.
Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.1.0...1.1.1
Added: XCTAssertDifference
for testing changes to values (https://github.com/pointfreeco/swift-custom-dump/pull/51).
This function evaluates a given expression before and after a given operation and then compares the results. The comparison is done by invoking the changes
closure with a mutable version of the initial value, and then asserting that the modifications made match the final value using XCTAssertNoDifference
.
For example, given a very simple counter structure, we can write a test against its incrementing functionality:
struct Counter {
var count = 0
var isOdd = false
mutating func increment() {
self.count += 1
self.isOdd.toggle()
}
}
var counter = Counter()
XCTAssertDifference(counter) {
counter.increment()
} changes: {
$0.count = 1
$0.isOdd = true
}
If changes
does not exhaustively describe all changed fields, the assertion will fail.
By omitting the operation you can write a "non-exhaustive" assertion against a value by describing just the fields you want to assert against in the changes
closure:
counter.increment()
XCTAssertDifference(counter) {
$0.count = 1
// Don't need to further describe how `isOdd` has changed
}
Infrastructure: README updates (thanks @JacksonUtsch, https://github.com/pointfreeco/swift-custom-dump/pull/96).
Infrastructure: Enable Windows CI (thanks @brianmichel, https://github.com/pointfreeco/swift-custom-dump/pull/99).
Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/1.0.0...1.1.0
Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/0.11.1...1.0.0
Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/0.11.0...0.11.1
Duration
(https://github.com/pointfreeco/swift-custom-dump/pull/92).Full Changelog: https://github.com/pointfreeco/swift-custom-dump/compare/0.10.3...0.11.0