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

Unit tests may be skipped #19

Open
dodikk opened this issue Dec 20, 2013 · 0 comments
Open

Unit tests may be skipped #19

dodikk opened this issue Dec 20, 2013 · 0 comments

Comments

@dodikk
Copy link
Member

dodikk commented Dec 20, 2013

Some tests contain static guards against second launch.
In this case they will pass but won't check anything.

- (void)testAddClassMethodIfNeedWithSelector
{
    static BOOL firstTestRun = YES;

    if (firstTestRun) {
    }

}

Please use comments or XCTFail() for such cases.

- (void)testAddClassMethodIfNeedWithSelector
{
    static BOOL firstTestRun = YES;

    if (firstTestRun) {
    }
    else
    {
        XCTFail( @"Test cannot be run twice" );
        return;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant