[SR-11250] Different behavior during testing between Xcode and SPM #53651
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
regression
standard library
Area: Standard library umbrella
swift 5.1
Attachment: Download
Environment
macOS 10.14.6
Xcode 11 beta5
Swift version 5.1-dev (LLVM af1f73e9e9, Swift 76e4d7f5ab)
Swift Package Manager - Swift 5.1.0 (1e376cb3)
Additional Detail from JIRA
md5: 9977c576b3fd79f56fb4d8df664cb128
Issue Description:
I have a test for an angle calculation, in Xcode the test is successful, but if I use SPM to run the test, the calculation returns "nan" and the test fails. I've added a small project to show the strange behavior of SPM.
SPM
[7/7] Linking testswiftPackageTests
Test Suite 'All tests' started at 2019-08-02 13:11:01.065
Test Suite 'testswiftPackageTests.xctest' started at 2019-08-02 13:11:01.065
Test Suite 'testswiftTests' started at 2019-08-02 13:11:01.065
Test Case '-[testswiftTests.testswiftTests testExample]' started.
/Users/daniel/testswift/Tests/testswiftTests/testswiftTests.swift:37: error:
[testswiftTests.testswiftTests testExample] : XCTAssertEqualWithAccuracy failed: ("nan") is not equal to ("55.53491470050634") +/("0.01")Test Case '-[testswiftTests.testswiftTests testExample]' failed (0.133 seconds).
Test Suite 'testswiftTests' failed at 2019-08-02 13:11:01.198.
Executed 1 test, with 1 failure (0 unexpected) in 0.133 (0.133) seconds
Test Suite 'testswiftPackageTests.xctest' failed at 2019-08-02 13:11:01.198.
Executed 1 test, with 1 failure (0 unexpected) in 0.133 (0.134) seconds
Test Suite 'All tests' failed at 2019-08-02 13:11:01.198.
Executed 1 test, with 1 failure (0 unexpected) in 0.133 (0.134) seconds
Xcode
Test Suite 'All tests' started at 2019-08-02 13:23:12.967
Test Suite 'testswiftTests.xctest' started at 2019-08-02 13:23:12.967
Test Suite 'testswiftTests' started at 2019-08-02 13:23:12.968
Test Case '-[testswiftTests.testswiftTests testExample]' started.
Test Case '-[testswiftTests.testswiftTests testExample]' passed (0.081 seconds).
Test Suite 'testswiftTests' passed at 2019-08-02 13:23:13.049.
Executed 1 test, with 0 failures (0 unexpected) in 0.081 (0.082) seconds
Test Suite 'testswiftTests.xctest' passed at 2019-08-02 13:23:13.051.
Executed 1 test, with 0 failures (0 unexpected) in 0.081 (0.083) seconds
Test Suite 'All tests' passed at 2019-08-02 13:23:13.051.
Executed 1 test, with 0 failures (0 unexpected) in 0.081 (0.084) seconds
The text was updated successfully, but these errors were encountered: