Skip to content

Releases: pointfreeco/swift-issue-reporting

0.3.1

01 Jul 21:57
8816142
Compare
Choose a tag to compare
  • Changed: XCTUnimplemented will no longer fatal error when range replaceable values are to be returned. Instead, it will return an empty value.
  • Changed: XCTUnimplemented overloads have been reduced, where Void-returning logic is built into the generic Result-returning functions.
  • Fixed: 0.3.0 introduced a regression in which calling XCTFail outside of tests from a debug build could cause a recursive loop.
  • Infrastructure: DocC documentation has been added.

0.3.0

28 Jun 18:54
f821dcb
Compare
Choose a tag to compare
  • Added XCTUnimplemented, a function for constructing "unimplemented" closures that call XCTFail when invoked.

    Helpful for stubbing dependencies held in value types. For example, a common use of XCTest Dynamic Overlay:

    struct FactClient {
      var fetch: (Int) async throws -> String
    }
    
    extension FactClient {
      struct Unimplemented: Error {
        let endpoint: String
      }
    
      static let unimplemented = Self(
        fetch: { _ in
          XCTFail("Unimplemented: \(Self.self).fetch")
          throw Unimplemented(endpoint: "\(Self.self).fetch")
        }
      )
    }

    Can be simplified using XCTUnimplemented:

    extension FactClient {
      static let unimplemented = Self(
        fetch: XCTUnimplemented("\(Self.self).fetch")
      )
    }
  • Changed: XCTFail now causes a runtime warning when called outside of tests.

0.2.1

23 Aug 14:18
50a70a9
Compare
Choose a tag to compare
  • Changed: XCTFail functions are now no-ops in non-DEBUG builds to avoid leaking symbols into RELEASE builds.

0.2.0

06 Aug 18:36
b9eeb1a
Compare
Choose a tag to compare
  • Changed: XCTFail is no longer restricted to DEBUG builds.

0.1.1

16 Jul 14:23
152390e
Compare
Choose a tag to compare
  • Includes MIT LICENSE.

0.1.0

22 Mar 13:26
Compare
Choose a tag to compare
  • Initial release!