Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing async keyword for generated method #16

Closed
mkowalski87 opened this issue Nov 16, 2023 · 0 comments
Closed

Missing async keyword for generated method #16

mkowalski87 opened this issue Nov 16, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mkowalski87
Copy link
Contributor

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)
}
@mkowalski87 mkowalski87 added the bug Something isn't working label Nov 16, 2023
@mkowalski87 mkowalski87 self-assigned this Nov 17, 2023
mkowalski87 added a commit to mkowalski87/XCTestParametrizedMacro that referenced this issue Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant