diff --git a/Tests/UltimathnumTests/BinaryInteger+Stdlib.swift b/Tests/UltimathnumTests/BinaryInteger+Stdlib.swift index c4581e47..bdcc0302 100644 --- a/Tests/UltimathnumTests/BinaryInteger+Stdlib.swift +++ b/Tests/UltimathnumTests/BinaryInteger+Stdlib.swift @@ -21,34 +21,37 @@ import TestKit2 // MARK: Tests //=------------------------------------------------------------------------= - @Test("BinaryInteger/stdlib - uniform", arguments: typesAsCoreInteger, fuzzers) - func stdlib(_ type: any CoreInteger.Type, _ randomness: consuming FuzzerInt) { - whereIs(type) + @Test( + "BinaryInteger/stdlib: conversions", + Tag.List.tags(.generic, .random), + arguments: typesAsCoreInteger, fuzzers + ) func conversions(type: any CoreInteger.Type, randomness: consuming FuzzerInt) throws { + try whereIs(type) - func whereIs(_ type: T.Type) where T: CoreInteger { + func whereIs(_ type: T.Type) throws where T: CoreInteger { for _ in 0 ..< 16 { var a = T.random(using: &randomness) var b = T.random(using: &randomness) let x = a let y = b - #expect(a == x) - #expect(b == y) - #expect(T(a.stdlib) == x) - #expect(T(b.stdlib) == y) - #expect(T(a.stdlib()) == x) - #expect(T(b.stdlib()) == y) + try #require(a == x) + try #require(b == y) + try #require(T(a.stdlib) == x) + try #require(T(b.stdlib) == y) + try #require(T(a.stdlib()) == x) + try #require(T(b.stdlib()) == y) a.stdlib ^= b.stdlib b.stdlib ^= a.stdlib a.stdlib ^= b.stdlib - #expect(a == y) - #expect(b == x) - #expect(T(a.stdlib) == y) - #expect(T(b.stdlib) == x) - #expect(T(a.stdlib()) == y) - #expect(T(b.stdlib()) == x) + try #require(a == y) + try #require(b == x) + try #require(T(a.stdlib) == y) + try #require(T(b.stdlib) == x) + try #require(T(a.stdlib()) == y) + try #require(T(b.stdlib()) == x) } } }