Closed oscbyspro closed 2 months ago
The empty [ ]
looked unintentional so I filled it with a hyphen: [-]
.
Fallible(Bit.zero, error: false) -> "0[-]"
Fallible(Bit.zero, error: true ) -> "0[x]"
Fallible(Bit.one, error: false) -> "1[-]"
Fallible(Bit.one, error: true ) -> "1[x]"
LiteralInt
suffers from a similar problem so I'll forward StaticBigInt/debugDescription
:
extension LiteralInt: CustomStringConvertible {
@inlinable public var description: String {
self.base.debugDescription
}
}
I also added Bit/description
prior to this post.
I'll add "+"
and "-"
Sign
descriptions too.
As I continue to adopt swift-testing (#97), it is apparent that "Fallible\<Bit>(value: Bit.one, error: false)" isn't great for debugging. So I'll conform
Fallible<T>
toCustomStringConvertible
and return the following description instead: