Skip to content

Refactor to rely less on global state for failure reporting #33

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

Merged
merged 1 commit into from
Jan 11, 2016

Conversation

briancroom
Copy link
Contributor

  • Also allows removing a weird public method from XCTestCase

This was originally a piece of #27 but it makes sense to apply standalone.

* Also allows removing a weird public method from XCTestCase
mike-ferris pushed a commit that referenced this pull request Jan 11, 2016
Refactor to rely less on global state for failure reporting
@mike-ferris mike-ferris merged commit 0a33c52 into swiftlang:master Jan 11, 2016
@briancroom briancroom deleted the refactor_failure_reporting branch January 11, 2016 18:01

let result = failures.count > 0 ? "failed" : "passed"

print("Test Case '\(method)' \(result) (\(printableStringForTimeInterval(duration)) seconds).")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is a regression that causes "passed" to never be output.

Before, the following line appeared outside of the XCTCurrentFailures loop:

print("Test Case '\(method)' \(result) (\(printableStringForTimeInterval(duration)) seconds).")

Now, it appears within the failures for loop. As a result, only the results of failing tests are printed.

modocache added a commit to modocache/swift-corelibs-xctest that referenced this pull request Jan 12, 2016
Fix a regression introduced in swiftlang#33 that causes the "test passed"
message to never be output. Add a test to prevent future regressions.
modocache added a commit to modocache/swift-corelibs-xctest that referenced this pull request Jan 13, 2016
swiftlang#33 introduced
another regression that was not fixed in 4944003: the total number of test
runs was not being reported correctly--only the total number of
failures.

Fix the misreporting, as well as the incorrect verification in the
`FailingTestSuite` functional test.
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

Successfully merging this pull request may close these issues.

3 participants