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

Add output parameter as an expected value for a test #5

Closed
mkowalski87 opened this issue Nov 8, 2023 · 1 comment
Closed

Add output parameter as an expected value for a test #5

mkowalski87 opened this issue Nov 8, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mkowalski87
Copy link
Contributor

We want to support specifying an expected value in a test so the developer can use XCTAssertEqual function.

So with the following feature, you could write test for simple power function

    @Parametrize(input: [1,2,3], output: [1, 4, 9])
    func testPow2(input n: Int, output result: Int) {
        XCTAssertEqual(pow2(n),result)
    }

and single expansion should look like this

    func testPow2_n_3_result_9() throws {
        let n: Int = 3
        let result: Int = 9
        XCTAssertEqual(pow2(n),result)
    }

Also, unit tests for this are needed

@mkowalski87 mkowalski87 added the enhancement New feature or request label Nov 8, 2023
@mkowalski87 mkowalski87 self-assigned this Nov 9, 2023
@mkowalski87
Copy link
Contributor Author

implemented under #8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant