PGSSoft / XCTestParametrizedMacro

Swift macro for parametrizing unit test methods
MIT License
123 stars 7 forks source link

Missing `async` keyword for generated method #16

Closed mkowalski87 closed 9 months ago

mkowalski87 commented 9 months ago

Macro is not adding async keyword for generated test methods. So using async methods inside tests is not possible

    @Parametrize(input: [1])
    func testMethod(input n: Int) async throws {
        XCTAssertTrue(n>0)
    }

currently generates following method

  func testMethod_N_1() throws {
      let n: Int = 1
      XCTAssertTrue(n > 0)
  }

but it should generate

func testMethod_N_1() async throws {
    let n: Int = 1
    XCTAssertTrue(n > 0)
}