The XCTest Project, A Swift core library for providing unit test support

Overview

XCTest

The XCTest library is designed to provide a common framework for writing unit tests in Swift, for Swift packages and applications.

This version of XCTest implements the majority of unit testing APIs included in XCTest from Xcode 7 and later. Its goal is to enable your project's tests to run on all the platforms Swift supports without having to rewrite them.

Using XCTest

Your tests are organized into a simple hierarchy. Each XCTestCase subclass has a set of test methods, each of which should test one part of your code.

For general information about using XCTest, see:

Using XCTest with Swift Package Manager

The Swift Package Manager integrates directly with XCTest to provide a streamlined experience for unit testing SwiftPM packages. If you are using XCTest within a SwiftPM package, unit test files are located within the package's Tests subdirectory, and you can build and run the full test suite in one step by running swift test.

For more information about using XCTest with SwiftPM, see its documentation.

Test Method Discovery

Unlike the version of XCTest included with Xcode, this version does not use the Objective-C runtime to automatically discover test methods because that runtime is not available on all platforms Swift supports. This means that in certain configurations, the full set of test methods must be explicitly provided to XCTest.

When using XCTest via SwiftPM on macOS, this is not necessary because SwiftPM uses the version of XCTest included with Xcode to run tests. But when using this version of XCTest without SwiftPM, or with SwiftPM on a platform other than macOS (including Linux), the full set of test methods cannot be discovered automatically, and your test target must tell XCTest about them explicitly.

The recommended way to do this is to create a static property in each of your XCTestCase subclasses. By convention, this property is named allTests, and should contain all of the tests in the class. For example:

class TestNSURL : XCTestCase {
    static var allTests = {
        return [
            ("test_bestNumber", test_bestNumber),
            ("test_URLStrings", test_URLStrings),
            ("test_fileURLWithPath", test_fileURLWithPath),
            // Other tests go here
        ]
    }()

    func test_bestNumber() {
        // Write your test here. Most of the XCTAssert functions you are familiar with are available.
        XCTAssertTrue(theBestNumber == 42, "The number is wrong")
    }

    // Other tests go here
}

After creating an allTests property in each XCTestCase subclass, you must tell XCTest about those classes' tests.

If the project is a SwiftPM package which supports macOS, the easiest way to do this is to run swift test --generate-linuxmain from a macOS machine. This command generates files within the package's Tests subdirectory which contains the necessary source code for passing all test classes and methods to XCTest. These files should be committed to source control and re-generated whenever XCTestCase subclasses or test methods are added to or removed from your package's test suite.

If the project is a SwiftPM package but does not support macOS, you may edit the package's default LinuxMain.swift file manually to add all XCTestCase subclasses.

If the project is not a SwiftPM package, follow the steps in the next section to create an executable which calls the XCTMain function manually.

Standalone Command Line Usage

When used by itself, without SwiftPM, this version of XCTest does not use the external xctest CLI test runner included with Xcode to run tests. Instead, you must create your own executable which links libXCTest.so, and in your main.swift, invoke the XCTMain function with an array of the tests from all XCTestCase subclasses that you wish to run, wrapped by the testCase helper function. For example:

XCTMain([
    testCase(TestNSString.allTests),
    testCase(TestNSArray.allTests),
    testCase(TestNSDictionary.allTests),
])

The XCTMain function does not return, and will cause your test executable to exit with either 0 for success or 1 for failure. Certain command line arguments can be used to modify the test runner behavior:

  • A particular test or test case can be selected to execute. For example:
$ ./FooTests Tests.FooTestCase/testFoo                            # Run a single test method
$ ./FooTests Tests.FooTestCase                                    # Run all the tests in FooTestCase
$ ./FooTests Tests.FooTestCase/testFoo,Tests.FooTestCase/testBar  # Run multiple test methods
  • Tests can be listed, instead of executed.
$ ./FooTests --list-tests
Listing 4 tests in FooTests.xctest:

Tests.FooTestCase/testFoo
Tests.FooTestCase/testBar
Tests.BarTestCase/test123

$ ./FooTests --dump-tests-json
{"tests":[{"tests":[{"tests":[{"name":"testFoo"},{"name":"testBar"}],"name":"Tests.FooTestCase"},{"tests":[{"name":"test123"}],"name":"Tests.BarTestCase"}],"name":"Tests.xctest"}],"name":"All tests"}

Contributing to XCTest

To contribute, you'll need to be able to build this project and and run its test suite. The easiest way to do so is via the Swift build script.

First, follow the instructions in the Swift README to build Swift from source. Confirm you're able to build the Swift project using utils/build-script -R.

Once you are able to build the Swift project, build XCTest and run its tests:

$ cd swift-corelibs-xctest
$ ../swift/utils/build-script --preset corelibs-xctest

This project is only guaranteed to build with the very latest commit on the Swift and swift-corelibs-foundation master branches. You may update to the latest commits using the Swift utils/update-checkout script:

$ ../swift/utils/update-checkout

Using Xcode

To browse files in this project using Xcode, use XCTest.xcworkspace. You may build the project using the SwiftXCTest scheme. Run the SwiftXCTestFunctionalTests scheme to run the tests.

However, in order to successfully build the project in Xcode, you must use an Xcode toolchain with an extremely recent version of Swift. The Swift website provides Xcode toolchains to download, as well as instructions on how to use Xcode with those toolchains. Swift development moves fairly quickly, and so even a week-old toolchain may no longer work.

If none of the toolchains available to download are recent enough to build XCTest, you may build your own toolchain by using the utils/build-toolchain script in the Swift repository.

Keep in mind that the build script invocation in "Contributing to XCTest" above will always work, regardless of which Swift toolchains you have installed. The Xcode workspace exists simply for the convenience of contributors. It is not necessary to successfully build this project in Xcode in order to contribute.

Comments
  • Add watchOS, tvOS, iOS platforms support

    Add watchOS, tvOS, iOS platforms support

    Motivation

    CoreLibs XCTest only supports desktop platforms. What limits us using CoreLibs XCTest on other platforms like iOS / Android. Xcode provides functionality to use XCTest framework on iOS, but this's Objective-C framework that is tightly coupled to Xcode. I see two main goals of this PR:

    1. Start making CoreLibs XCTest framework available for other platforms (not only for desktops).
    2. Start getting rid of XCTest framework coupled with Xcode and make CoreLibs XCTest as a basic framework for testing. I understand that this is a big deal. So this's only beginning of work.

    PS. I guess this PR strongly relates to apple/swift-corelibs-xctest#61 because currently tests only run for macOS platform.

    TODO

    • [ ] tests
    • [ ] Android?
    • [ ] define a way to run tests on mobile devices
    • [ ] what else ?
    opened by larryonoff 63
  • XCTestAssertNoThrow

    XCTestAssertNoThrow

    • Adds XCTestAssertNoThrow function
    • Adds two test for testing XCTestAssertNoThrow

    I get the following errors when attempting to test my branch. I might be doing something wrong.

    Arthur@ ~/Documents/oss/swift-oss/swift-corelibs-xctest 
    (feature/XCTestAssertNoThrow)$ ../swift/utils/build-script --preset corelibs-xctest
    ../swift/utils/build-script: note: using preset 'corelibs-xctest', which expands to 
    
    ../swift/utils/build-script --release --assertions --xctest --test -- --skip-test-cmark --skip-test-swift --skip-test-foundation --skip-build-benchmarks
    
    + mkdir -p /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert
    + env HOST_VARIABLE_macosx_x86_64__SWIFT_BENCHMARK_TARGETS=swift-benchmark-macosx-x86_64 HOST_VARIABLE_macosx_x86_64__SWIFT_RUN_BENCHMARK_TARGETS=check-swift-benchmark-macosx-x86_64 'HOST_VARIABLE_macosx_x86_64__SWIFT_SDKS=IOS IOS_SIMULATOR OSX TVOS TVOS_SIMULATOR WATCHOS WATCHOS_SIMULATOR' HOST_VARIABLE_macosx_x86_64__SWIFT_STDLIB_TARGETS=swift-test-stdlib-macosx-x86_64 HOST_VARIABLE_macosx_x86_64__SWIFT_TEST_TARGETS=check-swift-macosx-x86_64 caffeinate /Users/Arthur/Documents/oss/swift-oss/swift/utils/build-script-impl --workspace /Users/Arthur/Documents/oss/swift-oss --build-dir /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert --install-prefix /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr --host-target macosx-x86_64 --stdlib-deployment-targets 'macosx-x86_64 iphonesimulator-i386 iphonesimulator-x86_64 appletvsimulator-x86_64 watchsimulator-i386 iphoneos-armv7 iphoneos-armv7s iphoneos-arm64 appletvos-arm64 watchos-armv7k' --host-cc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang --host-cxx /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ --darwin-xcrun-toolchain default --darwin-deployment-version-osx=10.9 --darwin-deployment-version-ios=7.0 --darwin-deployment-version-tvos=9.0 --darwin-deployment-version-watchos=2.0 --cmake /usr/local/bin/cmake --cmark-build-type Release --llvm-build-type Release --swift-build-type Release --swift-stdlib-build-type Release --lldb-build-type Release --foundation-build-type Release --libdispatch-build-type Release --libicu-build-type Release --xctest-build-type Release --swiftpm-build-type Release --swift-enable-assertions true --swift-stdlib-enable-assertions true --swift-analyze-code-coverage false --cmake-generator Ninja --build-jobs 4 '--common-cmake-options=-G Ninja -DCMAKE_C_COMPILER:PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DCMAKE_CXX_COMPILER:PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja' --build-args=-j4 --cmark-cmake-options= '--llvm-cmake-options=-DLLVM_ENABLE_ASSERTIONS=TRUE -DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64;PowerPC;SystemZ' '--swift-cmake-options=-DSWIFT_STDLIB_ENABLE_SIL_OWNERSHIP=FALSE -DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE' --xctest-cmake-options= --build-stdlib-deployment-targets all --ninja-bin=/usr/local/bin/ninja --skip-build-benchmarks --skip-build-foundation --skip-build-lldb --skip-build-llbuild --skip-build-libdispatch --skip-build-libicu --skip-build-swiftpm --skip-build-playgroundlogger --skip-build-playgroundsupport --build-swift-dynamic-stdlib --build-swift-dynamic-sdk-overlay --skip-build-ios-device --skip-build-ios-simulator --skip-build-tvos-device --skip-build-tvos-simulator --skip-build-watchos-device --skip-build-watchos-simulator --skip-build-android --skip-test-ios-host --skip-test-ios-simulator --skip-test-tvos-host --skip-test-tvos-simulator --skip-test-watchos-host --skip-test-watchos-simulator --skip-test-android-host --skip-test-benchmarks --skip-test-optimized --android-deploy-device-path /data/local/tmp --toolchain-prefix /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain --skip-test-cmark --skip-test-swift --skip-test-foundation --llvm-lit-args=-sv
    Building the standard library for: swift-test-stdlib-macosx-x86_64
    cmark: using standard linker
    + /usr/local/bin/cmake --build /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/cmark-macosx-x86_64 -- -j4 all
    ninja: no work to do.
    llvm: using standard linker
    symlinking the system headers (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../../usr/include/c++) into the local clang build directory (/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/llvm-macosx-x86_64/include).
    + ln -s -f /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../../usr/include/c++ /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/llvm-macosx-x86_64/include
    + /usr/local/bin/cmake --build /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/llvm-macosx-x86_64 -- -j4 all
    ninja: no work to do.
    swift: using standard linker
    + /usr/local/bin/cmake --build /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/swift-macosx-x86_64 -- -j4 all swift-test-stdlib-macosx-x86_64
    [1/1] Building HTML documentation
    Running Sphinx v1.3.3
    loading pickled environment... done
    building [mo]: targets for 0 po files that are out of date
    building [html]: targets for 0 source files that are out of date
    updating environment: 0 added, 0 changed, 0 removed
    looking for now-outdated files... none found
    no targets are out of date.
    build succeeded.
    xctest: using standard linker
    + /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-xctest/build_script.py --swiftc=/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc --build-dir=/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64 --foundation-build-dir=/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/foundation-macosx-x86_64/Foundation --release
    xctest-build: xcodebuild -workspace /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-xctest/XCTest.xcworkspace -scheme SwiftXCTest -configuration Release SWIFT_EXEC="/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc" SWIFT_LINK_OBJC_RUNTIME=YES SYMROOT="/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64" OBJROOT="/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64"
    Build settings from command line:
        OBJROOT = /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64
        SWIFT_EXEC = /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc
        SWIFT_LINK_OBJC_RUNTIME = YES
        SYMROOT = /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64
    
    === BUILD TARGET CoreFoundation OF PROJECT Foundation WITH CONFIGURATION Release ===
    
    Check dependencies
    
    === BUILD TARGET SwiftFoundation OF PROJECT Foundation WITH CONFIGURATION Release ===
    
    Check dependencies
    
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
        cd /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation
        export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
        export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
        export TOOLCHAINS=com.apple.dt.toolchain.XcodeDefault
        /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc -incremental -module-name SwiftFoundation -O -whole-module-optimization -DDEPLOYMENT_ENABLE_LIBDISPATCH -DDEPLOYMENT_RUNTIME_SWIFT -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -target x86_64-apple-macosx10.11 -g -module-cache-path /Users/Arthur/Library/Developer/Xcode/DerivedData/ModuleCache -Xfrontend -serialize-debugging-options -I /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release -F /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release -c -num-threads 4 /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSArray.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSEnergyFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLError.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSPersonNameComponentsFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCompoundPredicate.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/FoundationErrors.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/URL.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLDTDNode.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSNull.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLProtectionSpace.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSEnumerator.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/CharacterSet.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSTimer.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLParser.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCFSet.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/MultiHandle.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/TaskRegistry.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSComparisonPredicate.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/NSURLSessionDelegate.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCache.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/HTTPMessage.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSOperation.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Unit.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCFCharacterSet.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSExpression.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSPort.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSTextCheckingResult.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/ProgressFraction.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSTimeZone.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDateComponentsFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLCredential.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLElement.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSJSONSerialization.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSString.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSRange.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSAttributedString.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSSwiftRuntime.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Date.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSFileHandle.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSPredicate.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSUUID.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLNode.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSLocale.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSError.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSSortDescriptor.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Boxing.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSBundle.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/ReferenceConvertible.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSSpecialValue.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/EasyHandle.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSPortMessage.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Bridging.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLAuthenticationChallenge.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSIndexSet.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDate.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSValue.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSFileManager.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCharacterSet.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Calendar.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Notification.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Locale.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSStream.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURL.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Set.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Array.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSThread.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSConcreteValue.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/TransferState.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSData.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/IndexPath.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSScanner.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSIndexPath.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSPathUtilities.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLRequest.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSGeometry.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDateFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSMeasurementFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSProcessInfo.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSRegularExpression.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSLengthFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCFArray.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/HTTPBodySource.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Progress.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDateIntervalFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/UUID.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/Configuration.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCalendar.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Process.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSObjCRuntime.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Dictionary.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSStringAPI.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/DateComponents.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDictionary.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSNumberFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedUnarchiver.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSStringEncodings.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Measurement.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSHost.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSAffineTransform.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLDocument.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCFDictionary.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/NSURLSession.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSNotificationQueue.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedArchiverHelpers.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDecimalNumber.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Data.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/String.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCoder.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedCoderOldStyleArray.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/IndexSet.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSNotification.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSObject.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSByteCountFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSPlatform.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/NSURLSessionTask.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLProtocol.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSLog.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSRunLoop.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLDTD.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/PersonNameComponents.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSMassFormatter.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSMeasurement.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSNumber.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/TimeZone.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLCache.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/ExtraStringAPIs.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/DateInterval.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSUserDefaults.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSLock.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/libcurlHelpers.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSSet.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSHTTPCookie.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/URLComponents.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSCFString.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSOrderedSet.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLResponse.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDecimal.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSHTTPCookieStorage.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/CGFloat.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLCredentialStorage.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/URLRequest.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSPropertyList.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSURLSession/NSURLSessionConfiguration.swift /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSPersonNameComponents.swift -output-file-map /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/SwiftFoundation-OutputFileMap.json -parseable-output -serialize-diagnostics -emit-dependencies -emit-module -emit-module-path /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/SwiftFoundation.swiftmodule -Xcc -iquote -Xcc /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-generated-files.hmap -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-own-target-headers.hmap -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-project-headers.hmap -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release/include -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release/usr/local/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2 -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/DerivedSources/x86_64 -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/DerivedSources -import-underlying-module -Xcc -working-directory/Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation
    
    CompileSwift normal x86_64
        cd /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation
        /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swift -frontend -c -filelist /var/folders/1_/dt39frhj0jsf9lb0df3pscf00000gn/T/sources-41d4dd -target x86_64-apple-macosx10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release -F /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release -g -import-underlying-module -module-cache-path /Users/Arthur/Library/Developer/Xcode/DerivedData/ModuleCache -D DEPLOYMENT_ENABLE_LIBDISPATCH -D DEPLOYMENT_RUNTIME_SWIFT -serialize-debugging-options -Xcc -iquote -Xcc /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-generated-files.hmap -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-own-target-headers.hmap -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-project-headers.hmap -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release/include -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release/usr/local/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2 -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/DerivedSources/x86_64 -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/DerivedSources -Xcc -working-directory/Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation -emit-module-doc-path /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/SwiftFoundation.swiftdoc -O -module-name SwiftFoundation -emit-module-path /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/SwiftFoundation.swiftmodule -serialize-diagnostics-path /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/NSArray.dia -emit-dependencies-path /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/NSArray.d -num-threads 4 -output-filelist /var/folders/1_/dt39frhj0jsf9lb0df3pscf00000gn/T/outputs-548004
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/CGFloat.swift:12:37: warning: unknown architecture for build configuration 'arch'
    #if arch(i386) || arch(arm) || arch(powerpc)
                                        ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/CGFloat.swift:12:37: note: did you mean 'powerpc64'?
    #if arch(i386) || arch(arm) || arch(powerpc)
                                        ^~~~~~~
                                        powerpc64
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/CGFloat.swift:173:37: warning: unknown architecture for build configuration 'arch'
    #if arch(i386) || arch(arm) || arch(powerpc)
                                        ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/CGFloat.swift:173:37: note: did you mean 'powerpc64'?
    #if arch(i386) || arch(arm) || arch(powerpc)
                                        ^~~~~~~
                                        powerpc64
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSArray.swift:373:34: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<Int32>' to 'UnsafeMutablePointer<UInt8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<Int32>' to rebind the type of memory
            return Data(bytesNoCopy: unsafeBitCast(buffer, to: UnsafeMutablePointer<UInt8>.self), count: count * MemoryLayout<Int>.size, deallocator: .custom({ _ in
                                     ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSArray.swift:133:16: warning: 'initialize(from:)' is deprecated: it will be removed in Swift 4.0.  Please use 'UnsafeMutableBufferPointer.initialize(from:)' instead
            buffer.initialize(from: optionalArray)
                   ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/CharacterSet.swift:489:16: warning: 'unsafeBitCast' from '_SwiftNSCharacterSet' to 'NSCharacterSet' is unnecessary and can be removed
            return unsafeBitCast(_wrapped, to: NSCharacterSet.self)
                   ^~~~~~~~~~~~~~        ~~~~~~~~~~~~~~~~~~~~~~~~~~
                                         
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLParser.swift:50:22: warning: 'unsafeBitCast' from 'UnsafePointer<UInt8>' to 'UnsafePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafePointer<UInt8>' to rebind the type of memory
        let len = strlen(unsafeBitCast(bytes, to: UnsafePointer<Int8>.self))
                         ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLParser.swift:260:114: warning: 'unsafeBitCast' from 'UnsafePointer<UInt8>' to 'UnsafePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafePointer<UInt8>' to rebind the type of memory
                    asAttrNamespaceNameString = _colonSeparatedStringFromPrefixAndSuffix("xmlns", 5, ns, UInt(strlen(unsafeBitCast(ns, to: UnsafePointer<Int8>.self))))
                                                                                                                     ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLParser.swift:292:56: warning: 'unsafeBitCast' from 'UnsafePointer<UInt8>' to 'UnsafePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafePointer<UInt8>' to rebind the type of memory
            let attrPrefixLen = attrPrefix != nil ? strlen(unsafeBitCast(attrPrefix!, to: UnsafePointer<Int8>.self)) : 0
                                                           ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLParser.swift:294:133: warning: 'unsafeBitCast' from 'UnsafePointer<UInt8>' to 'UnsafePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafePointer<UInt8>' to rebind the type of memory
                attributeQName = _colonSeparatedStringFromPrefixAndSuffix(attrPrefix!, UInt(attrPrefixLen), attrLocalName, UInt(strlen((unsafeBitCast(attrLocalName, to: UnsafePointer<Int8>.self)))))
                                                                                                                                        ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLParser.swift:310:29: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<UInt8>' to 'UnsafeMutablePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<UInt8>' to rebind the type of memory
                        strncpy(unsafeBitCast(buffer.baseAddress!, to: UnsafeMutablePointer<Int8>.self),
                                ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSXMLParser.swift:311:25: warning: 'unsafeBitCast' from 'UnsafePointer<UInt8>' to 'UnsafePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafePointer<UInt8>' to rebind the type of memory
                            unsafeBitCast(attributes[idx + 3]!, to: UnsafePointer<Int8>.self),
                            ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSString.swift:289:24: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<UInt16>' to 'UnsafePointer<UInt16>' can be replaced with 'UnsafePointer' initializer
                    return unsafeBitCast(_storage._core.startUTF16, to: UnsafePointer<UniChar>.self)
                           ^~~~~~~~~~~~~~                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           UnsafePointer(                         )
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSString.swift:280:24: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<UInt8>' to 'UnsafePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<UInt8>' to rebind the type of memory
                    return unsafeBitCast(_storage._core.startASCII, to: UnsafePointer<Int8>.self)
                           ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSString.swift:843:41: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<UInt8>' to 'UnsafeMutablePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<UInt8>' to rebind the type of memory
                    buffer.moveAssign(from: unsafeBitCast(_storage._core.startASCII, to: UnsafeMutablePointer<Int8>.self)
                                            ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift:299:54: warning: expression implicitly coerced from 'Any?' to Any
                return self._objRefMap[_SwiftValue.store(objv)] != nil
                                                         ^~~~
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift:299:54: note: provide a default value to avoid this warning
                return self._objRefMap[_SwiftValue.store(objv)] != nil
                                                         ^~~~
                                                              ?? <#default value#>
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift:299:54: note: force-unwrap the value to avoid this warning
                return self._objRefMap[_SwiftValue.store(objv)] != nil
                                                         ^~~~
                                                             !
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift:299:54: note: explicitly cast to Any with 'as Any' to silence this warning
                return self._objRefMap[_SwiftValue.store(objv)] != nil
                                                         ^~~~
                                                              as Any
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift:535:41: warning: string interpolation produces a debug description for an optional value; did you mean to make this explicit?
                        fatalError("Object \(object) does not conform to NSCoding")
                                            ^~~~~~~~
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift:535:42: note: use 'String(describing:)' to silence this warning
                        fatalError("Object \(object) does not conform to NSCoding")
                                            ~^~~~~~~
                                             String(describing:  )
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedArchiver.swift:535:42: note: provide a default value to avoid this warning
                        fatalError("Object \(object) does not conform to NSCoding")
                                            ~^~~~~~~
                                                    ?? <#default value#>
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/UUID.swift:62:34: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to 'UnsafePointer<UInt8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to rebind the type of memory
                    _cf_uuid_unparse(unsafeBitCast(val, to: UnsafePointer<UInt8>.self), unsafeBitCast(str, to: UnsafeMutablePointer<Int8>.self))
                                     ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/UUID.swift:62:85: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<(Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8)>' to 'UnsafeMutablePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<(Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8)>' to rebind the type of memory
                    _cf_uuid_unparse(unsafeBitCast(val, to: UnsafePointer<UInt8>.self), unsafeBitCast(str, to: UnsafeMutablePointer<Int8>.self))
                                                                                        ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/UUID.swift:63:40: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<(Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8)>' to 'UnsafePointer<Int8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<(Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8)>' to rebind the type of memory
                    return String(cString: unsafeBitCast(str, to: UnsafePointer<CChar>.self), encoding: .utf8)!
                                           ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/UUID.swift:71:48: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to 'UnsafeMutablePointer<UInt8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to rebind the type of memory
                return Int(bitPattern: CFHashBytes(unsafeBitCast($0, to: UnsafeMutablePointer<UInt8>.self), CFIndex(MemoryLayout<uuid_t>.size)))
                                                   ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/UUID.swift:88:38: warning: 'unsafeBitCast' from 'UnsafePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to 'UnsafePointer<UInt8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to rebind the type of memory
                return NSUUID(uuidBytes: unsafeBitCast($0, to: UnsafePointer<UInt8>.self))
                                         ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/UUID.swift:27:38: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to 'UnsafeMutablePointer<UInt8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to rebind the type of memory
                _cf_uuid_generate_random(unsafeBitCast($0, to: UnsafeMutablePointer<UInt8>.self))
                                         ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/UUID.swift:34:32: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to 'UnsafeMutablePointer<UInt8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to rebind the type of memory
                reference.getBytes(unsafeBitCast($0, to: UnsafeMutablePointer<UInt8>.self))
                                   ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/UUID.swift:44:43: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to 'UnsafeMutablePointer<UInt8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<(UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8, UInt8)>' to rebind the type of memory
                return _cf_uuid_parse(string, unsafeBitCast($0, to: UnsafeMutablePointer<UInt8>.self))
                                              ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Process.swift:210:20: warning: 'initialize(from:)' is deprecated: it will be removed in Swift 4.0.  Please use 'UnsafeMutableBufferPointer.initialize(from:)' instead
                buffer.initialize(from: array.map { $0.withCString(strdup) })
                       ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Process.swift:210:20: warning: 'initialize(from:)' is deprecated: it will be removed in Swift 4.0.  Please use 'UnsafeMutableBufferPointer.initialize(from:)' instead
                buffer.initialize(from: array.map { $0.withCString(strdup) })
                       ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Process.swift:228:18: warning: 'initialize(from:)' is deprecated: it will be removed in Swift 4.0.  Please use 'UnsafeMutableBufferPointer.initialize(from:)' instead
                envp.initialize(from: env.map { strdup("\($0)=\($1)") })
                     ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDictionary.swift:127:19: warning: 'initialize(from:)' is deprecated: it will be removed in Swift 4.0.  Please use 'UnsafeMutableBufferPointer.initialize(from:)' instead
            keyBuffer.initialize(from: keys)
                      ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDictionary.swift:130:21: warning: 'initialize(from:)' is deprecated: it will be removed in Swift 4.0.  Please use 'UnsafeMutableBufferPointer.initialize(from:)' instead
            valueBuffer.initialize(from: objects.map { _SwiftValue.store($0) })
                        ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedUnarchiver.swift:393:57: warning: expression implicitly coerced from 'Any?' to Any
            object = self._replacementMap[_SwiftValue.store(decodedObject)]
                                                            ^~~~~~~~~~~~~
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedUnarchiver.swift:393:57: note: provide a default value to avoid this warning
            object = self._replacementMap[_SwiftValue.store(decodedObject)]
                                                            ^~~~~~~~~~~~~
                                                                          ?? <#default value#>
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedUnarchiver.swift:393:57: note: force-unwrap the value to avoid this warning
            object = self._replacementMap[_SwiftValue.store(decodedObject)]
                                                            ^~~~~~~~~~~~~
                                                                         !
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedUnarchiver.swift:393:57: note: explicitly cast to Any with 'as Any' to silence this warning
            object = self._replacementMap[_SwiftValue.store(decodedObject)]
                                                            ^~~~~~~~~~~~~
                                                                          as Any
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedUnarchiver.swift:460:85: warning: string interpolation produces a debug description for an optional value; did you mean to make this explicit?
                                             withDescription: "Invalid class reference \(innerDecodingContext.dict["$class"]). The data may be corrupt.")
                                                                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedUnarchiver.swift:460:111: note: use 'String(describing:)' to silence this warning
                                             withDescription: "Invalid class reference \(innerDecodingContext.dict["$class"]). The data may be corrupt.")
                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
                                                                                         String(describing:                 )
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSKeyedUnarchiver.swift:460:111: note: provide a default value to avoid this warning
                                             withDescription: "Invalid class reference \(innerDecodingContext.dict["$class"]). The data may be corrupt.")
                                                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
                                                                                                                             ?? <#default value#>
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSAffineTransform.swift:120:34: warning: 'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.
            let α = Double(angle) * M_PI / 180.0
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSAffineTransform.swift:148:34: warning: 'M_PI' is deprecated: Please use 'Double.pi' or '.pi' to get the value of correct type and avoid casting.
            let α = Double(angle) * M_PI / 180.0
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/Data.swift:86:90: warning: 'unsafeBitCast' from 'UnsafeMutableRawPointer' to 'Int' can be replaced with 'bitPattern:' initializer on 'Int'
            if _DataStorage.vmOpsThreshold <= num && ((unsafeBitCast(source, to: Int.self) | unsafeBitCast(dest, to: Int.self)) & (NSPageSize() - 1)) == 0 {
                                                                                             ^~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~
                                                                                             Int(bitPattern:   )
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/DateInterval.swift:159:48: warning: 'unsafeBitCast' from 'UnsafeMutablePointer<(UInt, UInt)>' to 'UnsafeMutablePointer<UInt8>' changes pointee type and may lead to undefined behavior; use the 'withMemoryRebound' method on 'UnsafeMutablePointer<(UInt, UInt)>' to rebind the type of memory
                return Int(bitPattern: CFHashBytes(unsafeBitCast($0, to: UnsafeMutablePointer<UInt8>.self), CFIndex(MemoryLayout<UInt>.size * 2)))
                                                   ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDecimal.swift:1038:66: warning: '-' is deprecated: Mixed-type subtraction is deprecated. Please use explicit type conversion.
        _ = integerMultiplyByPowerOf10(&result, bb.pointee, maxpow10 - diffexp)
                                                                     ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDecimal.swift:1041:26: warning: '-=' is deprecated: Mixed-type subtraction is deprecated. Please use explicit type conversion.
        bb.pointee._exponent -= maxpow10 - diffexp;
                             ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDecimal.swift:1041:38: warning: '-' is deprecated: Mixed-type subtraction is deprecated. Please use explicit type conversion.
        bb.pointee._exponent -= maxpow10 - diffexp;
                                         ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDecimal.swift:1339:27: warning: '-' is deprecated: Mixed-type subtraction is deprecated. Please use explicit type conversion.
        if (19 <= a._exponent - b._exponent) {
                              ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDecimal.swift:1618:23: warning: '+' is deprecated: Mixed-type addition is deprecated. Please use explicit type conversion.
            var s = scale + _exponent
                          ^
    /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation/Foundation/NSDecimal.swift:2028:42: warning: '+' is deprecated: Mixed-type addition is deprecated. Please use explicit type conversion.
                    exponent = 10 * exponent + numeral
                                             ^
    Assertion failed: (FuncChild->getKind() != Node::Kind::Suffix || FuncChild->getText() == "merged"), function finalize, file /Users/Arthur/Documents/oss/swift-oss/swift/lib/SILOptimizer/Utils/SpecializationMangler.cpp, line 47.
    0  swift                    0x000000010bef14d8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
    1  swift                    0x000000010bef1bd6 SignalHandler(int) + 454
    2  libsystem_platform.dylib 0x00007fff8f731bba _sigtramp + 26
    3  libsystem_platform.dylib 0x00007fff56ea32a0 _sigtramp + 3346470656
    4  libsystem_c.dylib        0x00007fff8f5b8420 abort + 129
    5  libsystem_c.dylib        0x00007fff8f57f893 basename_r + 0
    6  swift                    0x00000001090eca1a swift::NewMangling::SpecializationMangler::finalize() + 1290
    7  swift                    0x00000001090ede0c swift::NewMangling::FunctionSignatureSpecializationMangler::mangle(int) + 476
    8  swift                    0x000000010919e5be FunctionSignatureTransform::createOptimizedSILFunctionName() + 462
    9  swift                    0x000000010919f0e4 FunctionSignatureTransform::createFunctionSignatureOptimizedFunction() + 52
    10 swift                    0x00000001091a4568 FunctionSignatureTransform::run(bool) + 648
    11 swift                    0x00000001091a3ac5 (anonymous namespace)::FunctionSignatureOpts::run() + 2069
    12 swift                    0x00000001090eef19 swift::SILPassManager::runPassOnFunction(swift::SILFunctionTransform*, swift::SILFunction*) + 2473
    13 swift                    0x00000001090efe07 swift::SILPassManager::runFunctionPasses(llvm::ArrayRef<swift::SILFunctionTransform*>) + 1127
    14 swift                    0x00000001090f1114 swift::SILPassManager::runOneIteration() + 948
    15 swift                    0x0000000108ef83db swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 187
    16 swift                    0x00000001090fa463 swift::runSILOptimizationPasses(swift::SILModule&) + 243
    17 swift                    0x0000000108da43c5 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 13653
    18 swift                    0x0000000108d5bcf1 main + 3025
    19 libdyld.dylib            0x00007fff8f524255 start + 1
    Stack dump:
    0.	Program arguments: /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swift -frontend -c -filelist /var/folders/1_/dt39frhj0jsf9lb0df3pscf00000gn/T/sources-41d4dd -target x86_64-apple-macosx10.11 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -I /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release -F /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release -g -import-underlying-module -module-cache-path /Users/Arthur/Library/Developer/Xcode/DerivedData/ModuleCache -D DEPLOYMENT_ENABLE_LIBDISPATCH -D DEPLOYMENT_RUNTIME_SWIFT -serialize-debugging-options -Xcc -iquote -Xcc /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-generated-files.hmap -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-own-target-headers.hmap -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/SwiftFoundation-project-headers.hmap -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release/include -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Release/usr/local/include -Xcc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2 -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/DerivedSources/x86_64 -Xcc -I/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/DerivedSources -Xcc -working-directory/Users/Arthur/Documents/oss/swift-oss/swift-corelibs-foundation -emit-module-doc-path /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/SwiftFoundation.swiftdoc -O -module-name SwiftFoundation -emit-module-path /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/SwiftFoundation.swiftmodule -serialize-diagnostics-path /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/NSArray.dia -emit-dependencies-path /Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64/Foundation.build/Release/SwiftFoundation.build/Objects-normal/x86_64/NSArray.d -num-threads 4 -output-filelist /var/folders/1_/dt39frhj0jsf9lb0df3pscf00000gn/T/outputs-548004 
    1.	While running pass #2833414 SILFunctionTransform "Function Signature Optimization" on SILFunction "@_TTSfq4n_d___TFSSCfVSS13CharacterViewSS_unique_suffix".
    
    <unknown>:0: error: unable to execute command: Abort trap: 6
    <unknown>:0: error: compile command failed due to signal (use -v to see invocation)
    ** BUILD FAILED **
    
    
    The following build commands failed:
    	CompileSwift normal x86_64
    	CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
    (2 failures)
    Traceback (most recent call last):
      File "/Users/Arthur/Documents/oss/swift-oss/swift-corelibs-xctest/build_script.py", line 524, in <module>
        main()
      File "/Users/Arthur/Documents/oss/swift-oss/swift-corelibs-xctest/build_script.py", line 520, in main
        parsed_args.func(parsed_args)
      File "/Users/Arthur/Documents/oss/swift-oss/swift-corelibs-xctest/build_script.py", line 98, in build
        source_dir=SOURCE_DIR))
      File "/Users/Arthur/Documents/oss/swift-oss/swift-corelibs-xctest/build_script.py", line 31, in run
        subprocess.check_call(command, shell=True)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command 'xcodebuild -workspace /Users/Arthur/Documents/oss/swift-oss/swift-corelibs-xctest/XCTest.xcworkspace -scheme SwiftXCTest -configuration Release SWIFT_EXEC="/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/swift-macosx-x86_64/bin/swiftc" SWIFT_LINK_OBJC_RUNTIME=YES SYMROOT="/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64" OBJROOT="/Users/Arthur/Documents/oss/swift-oss/build/Ninja-ReleaseAssert/xctest-macosx-x86_64"' returned non-zero exit status 65
    ../swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
    ../swift/utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
    
    opened by ArtSabintsev 48
  • [SR-460] Provide XCTestCase a class to allow overriding setUp() and tearDown()

    [SR-460] Provide XCTestCase a class to allow overriding setUp() and tearDown()

    What is it?

    This PR renames the XCTestCase protocol to XCTestCaseType and introduces a new XCTestCase class in its place which individual test cases may derive from. A relevant test case is also included (see below).

    Motivation

    Providing XCTestCase as just a protocol rather than a class is a great concept, however it presents an insurmountable barrier to achieving source-level compatibility with Darwin XCTest with respect to defining setUp() and tearDown() methods in test cases, because the override keyword is required when inheriting (Darwin XCTest) but is prohibited when just conforming to the protocol (Corelibs XCTest). With this patch, it becomes possible to write a test case utilizing setUp() and tearDown() which builds with both frameworks. Here is the example from SR-460:

    import XCTest
    
    class Test: XCTestCase {
        var allTests: [(String, () -> Void)] { return [("testExample", testExample)] }
    
        override func setUp() {
            super.setUp()
        }
    
        override func tearDown() {
            super.tearDown()
        }
    
        func testExample() {
            XCTAssertEqual(1, 1)
        }
    }
    

    Drawbacks

    There is one significant caveat to this change: test cases deriving from the new XCTestCase class must still explicitly declare conformance to the XCTestCaseType protocol before they can be passed to XCTMain, which makes this a breaking change for current users of Corelibs XCTest. (The XCTestCase base class can't conform to XCTestCaseType without losing compile-time checking that individual test cases provide an allTests property for their own tests.) I see two reasonable approaches to this for cross-platform tests:

    1. Conditionally redeclare XCTestCaseType on Apple platforms, and conform to the protocol in-line for each test case. This is essentially what swiftpm is currently doing (see here and here).
    2. Add XCTestCaseType conformance in a separate source file (perhaps the main.swift entry point which contains the call to XCTMain). I can easily imagine running a script as a part of the build process which dynamically generates a source file adding this conformance to each test case class. Such a script could even be made to generate the allTests property implementation automatically as well.

    Rejected Alternatives

    I considered a couple of variants before settling on the current contents of this patch. Note that neither of these include the XCTestCaseType protocol:

    • Convert the XCTestCase protocol into a class which conforms to XCTestCaseProvider. In this version, the base XCTestCase class included an empty allTests definition. This was rejected both because it required individual test cases to mark their allTests definitions as override, and because there would be no compile-time checking that an overridden allTests was present at all.
    • Convert the XCTestCase protocol into a class which does not conform to XCTestCaseProvider. In this implementation, XCTMain remained unchanged, and accepted an array of XCTestCase classes. This fared poorly because it required a runtime check that individual test cases conform to XCTestCaseProvider, which felt like a missed opportunity to leverage the type system.

    I look forward to getting feedback and iterating on this! @mike-ferris-apple @eschaton @modocache

    opened by briancroom 47
  • Asynchronous testing API [AsyncXCTest 6/6]

    Asynchronous testing API [AsyncXCTest 6/6]

    What's in this pull request?

    An attempt to add asynchronous testing support, mirroring the Objective-C XCTest API. This is done primarily via two methods:

    • XCTestCase.expectationWithDescription()
    • XCTestCase.waitForExpectationsWithTimeout()

    The tests in the pull request pass on Darwin, but not on Linux. Still, I've encountered a few issues that I'd like to get feedback on.

    What's worth discussing about this pull request?

    The methods added are identical to their Objective-C SDK overlay counterparts, with the following exceptions:

    1. If expectations are created but not waited for, Objective-C XCTest generates a test failure. In order to display a failure on the exact line of the last expectation that was created, Objective-C XCTest symbolicates the call stack. It does so using a private framework called CoreSymbolication.framework. We don't have this at our disposal for swift-corelibs-xctest, so instead this pull request has the method take file and line as parameters, defaulting to __FILE__ and __LINE__. By doing so, we provide the same failure highlighting functionality while also maintaining a (nearly) identical API.
    2. If waitForExpectationsWithTimeout() fails, Objective-C XCTest generates a test failure on the exact line that method was called, using the same technique from (1). For the same reason, this method also takes file and line parameters in this pull request.
    3. waitForExpectationsWithTimeout() takes a handler callback, which in Objective-C XCTest is passed an instance of NSError. swift-corelibs-xctest doesn't depend upon swift-corelibs-foundation, and so does not have access to NSError. Instead, it defines a shim, XCTError.

    I'd like to discuss the following:

    (A) Without using something like CoreSymbolication.framework, we cannot emit failures for the correct file or line while maintaining an identical API. This pull request is a sort of middle ground; the use of the API looks identical:

    // Objective-C XCTest
    let expectation = self.expectationWithDescription("foo")
    expectation.fulfill()
    self.waitForExpectationsWithTimeout(10, handler: nil)
    self.waitForExpectationsWithTimeout(10) { error in
        // ...
    }
    
    // swift-corelibs-xctest
    let expectation = self.expectationWithDescription("bar")
    expectation.fulfill()
    self.waitForExpectationsWithTimeout(10, handler: nil)
    self.waitForExpectationsWithTimeout(10) { error in
        // ...
    }
    

    However, they're not totally identical. The following is only possible in swift-corelibs-xctest:

    // swift-corelibs-xctest
    let expectation = self.expectationWithDescription("baz", file: "/path/to/file", line: 10)
    expectation.fulfill()
    self.waitForExpectationsWithTimeout(10, file: "/path/to/file", line: 20, handler: nil)
    

    Is this an acceptable solution?

    (B) The code in this pull request has a dummy implementation to wait for expectations to be fulfilled. For a real implementation, I think we'll need to add a dependency to swift-corelibs-xctest, and I think that should either be swift-corelibs-libdispatch or swift-corelibs-foundation.

    I think swift-corelibs-foundation would be ideal: it includes both:

    • NSRunLoop, which we can use to implement the waiting logic, and...
    • ...NSError, which is used by the callback to waitForExpectationsWithTimeout().

    However, swift-corelibs-foundation uses swift-corelibs-xctest for its own unit test suite. So while the dependency isn't exactly cyclical (Foundation's tests depend on XCTest, which depends on Foundation--no cycle), it's still a little murky as to whether it's a good idea.

    Should swift-corelibs-xctest depend on swift-corelibs-foundation? Should it depend on swift-corelibs-libdispatch? Or should it depend on neither--and if so, how can we implement asynchronous testing?

    /cc @briancroom @jeffh

    opened by modocache 44
  • Use XCTestRun to execute tests and report results

    Use XCTestRun to execute tests and report results

    What's in this pull request?

    A major goal for swift-corelibs-xctest is API parity with Apple XCTest. This adds the largest missing API in swift-corelibs-xctest: XCTestRun.

    In Apple XCTest, XCTestRun is responsible for keeping track of the result of a test run. It's an integral part of how Apple XCTest works. swift-corelibs-xctest, on the other hand, used a global array of XCTRun structs to keep track of how many tests passed/failed.

    While it may have been possible to tack on XCTestRun to the swift-corelibs-xctest mechanism for failure reporting, this commit instead fully integrates it. As a result, the changes are widespread: gone is XCTFailureHandler, XCTRun, and other internal structures. In their place, welcome the Apple XCTest public APIs: the XCTest abstract class, XCTestRun, and its subclasses XCTestCaseRun and XCTestSuiteRun.

    In conjunction with the new XCTestSuite-related observation methods from #84, test reporting is now done exclusively through XCTestObservation. As a result, test output is now nearly identical to Apple XCTest.

    Why merge this pull request?

    • Our goal for Swift 3 is API parity, and this pull request implements a ton of the Apple XCTest API.
    • This pull request implements test output that is nearly identical to Apple XCTest, including announcements about test suites starting and stopping.

    What downsides are there to merging this pull request?

    • This is a massive overhaul of swift-corelibs-xctest internals. It's hard to review such a large set of changes. I am sorry about this, and merging #84 first should slim this pull request down a bit--but even then, this is huge. In my defense, XCTestRun is a major part of the Apple XCTest API; introducing it to swift-corelibs-xctest requires a lot of changes.
    • I recommend looking at the changes to Tests/Functional first. Note that these changes report test suites, as well as start and stop times for each test suite/case.
    • A lot of the existing Swift code is much more "idiomatic" than the code here, which introduces two "abstract" base classes: XCTest and XCTestRun. Like it or not, this is the Apple XCTest API, which has been built for Objective-C since day one. We'll leave it to the third-party testing frameworks to build APIs more suitable to Swift.
    opened by modocache 25
  • Add @discardableResult annotation to applicable public API methods.

    Add @discardableResult annotation to applicable public API methods.

    This maintains consistency with the Darwin XCTest APIs. This also cleans up some warnings in the functional test suite which were being generated because this annotation wasn't present.

    I'll note that there's a case to be made that expectation(description:file:line:) should not have @discardableResult, because the expectation it produces can only be fulfilled by invoking a method on the returned value. Nonetheless, I think it's better to keep the APIs in sync for right now and revisit in the future.

    opened by briancroom 23
  • Build a static library version of xctest

    Build a static library version of xctest

    libXCTest.a can optionally be installed with --static-library-install-path

    This is required for working towards getting Foundation to be statically linkable on Linux

    opened by spevans 20
  • [REVIEW] Add Async Support to XCTest

    [REVIEW] Add Async Support to XCTest

    This is a work-in-progress pull request that @stmontgomery and I have been working on which adds first-class async/await support to the cross-platform XCTest.

    Please withhold comments until this PR changes from [WIP] to [REVIEW].

    17/08/21 Update: This PR has now been opened for review and is being actively iterated on.

    opened by SeanROlszewski 19
  • [SR-907] Add convenience XCTestExpectation constructors for NSNotification

    [SR-907] Add convenience XCTestExpectation constructors for NSNotification

    | | | |------------------|-----------------| |Previous ID | SR-907 | |Radar | None | |Original Reporter | @modocache | |Type | Improvement | |Status | Closed | |Resolution | Done |

    Attachment: Download

    Additional Detail from JIRA

    | | | |------------------|-----------------| |Votes | 0 | |Component/s | XCTest | |Labels | Improvement, StarterBug | |Assignee | apps.yoon (JIRA) | |Priority | Medium |

    md5: 2bc0310ca30f22236b57ae9be6504fd5

    Issue Description:

    Apple XCTest offers several convenient methods for constructing XCTestExpectations:

    @interface XCTestCase : XCTest
    // ...
    - (XCTestExpectation *)keyValueObservingExpectationForObject:(id)objectToObserve keyPath:(NSString *)keyPath expectedValue:(nullable id)expectedValue;
    - (XCTestExpectation *)keyValueObservingExpectationForObject:(id)objectToObserve keyPath:(NSString *)keyPath handler:(nullable XCKeyValueObservingExpectationHandler)handler;
    - (XCTestExpectation *)expectationForNotification:(NSString *)notificationName object:(nullable id)objectToObserve handler:(nullable XCNotificationExpectationHandler)handler;
    - (XCTestExpectation *)expectationForPredicate:(NSPredicate *)predicate evaluatedWithObject:(id)object handler:(nullable XCPredicateExpectationHandler)handler;
    // ...
    @end
    

    Key-value observing doesn't exist in native Swift, but NSNotification and NSPredicate do (thanks to swift-corelibs-foundation). Add the following convenience constructors:

    1. expectationForNotification:object:handler:
    2. expectationForPredicate:evaluatedWithObject:handler:

    Also, note that you'll need to add the following closure typealiases as well:

    typedef BOOL (^XCNotificationExpectationHandler)(NSNotification *notification);
    typedef BOOL (^XCPredicateExpectationHandler)();
    
    Improvement XCTest StarterBug 
    opened by ec882e32-f2b6-4d2a-849c-98d6c7df0cfb 18
  • [XCTestExpectation] Adding expectationForNotification

    [XCTestExpectation] Adding expectationForNotification

    What's in this pull request?

    This pull request adds the XCTestCase convenience constructor for XCTestExpectation expectationForNotification:object:handler:.

    It also includes the XCNotificationExpectationHandler typealias file as well as tests to check expectationForNotification:object:handler: behavior.

    https://bugs.swift.org/browse/SR-907 However, this pull request does not include the convenience constructor expectationForPredicate:evaluatedWithObject:handler: described in the ticket, as NSPredicate initializers have yet to be implemented.

    Why merge this pull request?

    This will provide a full Swift implementation of expectationForNotification:object:handler: that allows asynchronous testing for NSNotification.

    opened by kylesyoon 18
  • [README] Encourage using the Swift build script

    [README] Encourage using the Swift build script

    New contributors to swift-corelibs-xctest are having some difficulty knowing where to start:

    • https://bugs.swift.org/browse/SR-981
    • https://bugs.swift.org/browse/SR-907
    • https://bugs.swift.org/browse/SR-906

    The problem is that over time this project has begun to take on more dependencies:

    • To build the project, one must use a modern Swift 3 compiler (often one more recent than the latest https://swift.org snapshot).
    • To build the project, one must have swift-corelibs-foundation checked out at a particular path.
    • To run the test suite, one must have the LLVM lit test runner installed at a particular path.

    In addition, the build steps differ based on whether the contributor is using an OS X or Linux development environment.

    This commit revamps the README and the Linux build_script.py to require fewer steps for new contributors to get started. Specifically, it encourages contributors to use the Swift utils/build-script. There are many reasons to do so:

    • The XCTest CI uses that script, so contributors will need to make sure it passes to get their contributions merged.
    • That script ensures that the correct build of swiftc and swift-corelibs-foundation are used.
    • That script works across all platforms, and is invoked in the same way on each platform.

    In addition, more detailed information on the project has been moved to a Documentation directory. This resembles other projects in the Swift family of repositories.


    This should probably be merged after https://github.com/apple/swift/pull/1748. That pull request puts the final touches on building XCTest via the Swift build script on OS X.

    opened by modocache 18
  • Type inference issues in `__allTests__FooTests` when using `@MainActor`

    Type inference issues in `__allTests__FooTests` when using `@MainActor`

    Description

    While working in the ReactiveSwift port of The Composable Architecture, more specifically ensuring Linux support, the swift test calls started failing on the generated __allTests__FooTests properties as can be seen below.

    Relevant CI run here (from ReactiveCocoa/reactiveswift-composable-architecture#58)

    /home/runner/work/reactiveswift-composable-architecture/reactiveswift-composable-architecture/.build/x86_64-unknown-linux-gnu/debug/reactiveswift-composable-architecturePackageTests.derived/ComposableArchitectureTests.swift:227:29: error: cannot convert value of type '[Any]' to expected argument type '[(String, (XCTestCase) -> () -> Void)]'
            testCase(StoreTests.__allTests__StoreTests),
                                ^
    

    After some investigation I was able to narrow down the problem to the use of @MainActor on the test suites, which are used on the "problematic" test suites. I then proceeded to create some minimal examples that replicate the issue.

    As they are, the following error is triggered:

    Heterogeneous collection literal could only be inferred to '[Any]'; add explicit type annotation if this is intentional
    Insert ' as [Any]'
    

    If we uncomment the commented lines, the collection literal is correctly inferred to type [(String, (DummyTests) -> @MainActor () throws -> ())], but even then I'm not sure if it will work as the expected type appears to be[(String, (XCTestCase) -> () throws -> Void)] which doesn't have @MainActor, right?

    That means perhaps this means @MainActor is simply not supported yet as it will require new overloads/wrappers to deal with @MainActor annotated tests, and possibly will also involve the codegen in SPM.

    For now I will probably disable these tests in Linux, but it would be nice to have them included. Thanks! 🙏🏼

    Demo

    fileprivate extension DummyTests {
        static let __allTests__DummyTests = [
            ("testNormal", testNormal),
            ("testNormalThrows", testNormalThrows),
    
            ("testAsync", asyncTest(testAsync)),
            ("testAsyncThrows", asyncTest(testAsyncThrows)),
    
            ("testMainActor", testMainActor),
    //        ("testMainActorThrows", testMainActorThrows), // if we uncomment this one it infers correctly
    
            ("testMainActorAsync", asyncTest(testMainActorAsync)),
            ("testMainActorAsyncThrows", asyncTest(testMainActorAsyncThrows)),
        ]
    }
    
    fileprivate extension MainActorDummyTests {
        static let __allTests__MainActorDummyTests = [
            ("testNormal", testNormal),
    //        ("testNormalThrows", testNormalThrows), // if we uncomment this one it infers correctly
    
            ("testAsync", asyncTest(testAsync)),
            ("testAsyncThrows", asyncTest(testAsyncThrows)),
        ]
    }
    
    final class DummyTests: XCTestCase {
    
        func testNormal() {}
        func testNormalThrows() throws {}
    
        func testAsync() async {}
        func testAsyncThrows() async throws {}
    
        @MainActor func testMainActor() {}
        @MainActor func testMainActorThrows() throws {}
    
        @MainActor func testMainActorAsync() async {}
        @MainActor func testMainActorAsyncThrows() async throws {}
    }
    
    @MainActor
    final class MainActorDummyTests: XCTestCase {
    
        func testNormal() {}
        func testNormalThrows() throws {}
    
        func testAsync() async {}
        func testAsyncThrows() async throws {}
    }
    

    Environment

    • Swift 5.7
    • Ubuntu Linux 20.04 and macOS 12.6 / Xcode 14.1 (14B47b)
    opened by p4checo 0
  • [XCTest][Automation] Element with locator was not found from webdriver even it is exists (only on real device iOS 16.1/16.2beta)

    [XCTest][Automation] Element with locator was not found from webdriver even it is exists (only on real device iOS 16.1/16.2beta)

    There is a different behaviour on same screen on simulator ios 16.1 iphone 12 and real device (SauceLabs) ios 16.1/16.2beta iPhone 12.

    1. On simulator I am able to get element by AppiumBy.iOSClassChain - **/XCUIElementTypeCell[name == 'address']/XCUIElementTypeTextView[name = 'detail_1'], and test passes. Here is screenshot from appium inspector:

    Screenshot 2022-12-07 at 16 49 15

    1. On real device ios 16.1/16.2beta only (iOS 15.6 issue is not reproducible) test is failing on same screen with error message Element with locator: AppiumBy.iOSClassChain: **/XCUIElementTypeCell[name == 'address']/XCUIElementTypeTextView[name = 'detail_1'] was not found from webdriver / root element after 20 seconds. Here is screenshot from appium inspector:
    Screenshot 2022-12-07 at 17 23 03

    Expected Behavior On real device element should be found by AppiumBy.iOSClassChain: **/XCUIElementTypeCell[name == 'address']/XCUIElementTypeTextView[name = 'detail_1'] and test should pass

    Minimal Reproducible Example driver.findElement(AppiumBy.iOSClassChain("**/XCUIElementTypeCell[name == 'address']/XCUIElementTypeTextView[name = 'detail_1']"));

    Environment Operating system: mac If running via appium CLI... Appium CLI version (output of appium --version): 2.0.0-beta.44 Node.js version (output of node --version): v17.4.0 npm version (output of npm --version): 8.3.1 Real device or emulator/simulator: real device iOS 16.1

    Link to Appium Logs https://gist.github.com/StsiapanPal/ab82d6de6510cb29614f9d48d0f0f583

    opened by StsiapanPal 1
  • Lower macOS availability of async APIs from 12.0 to 10.15

    Lower macOS availability of async APIs from 12.0 to 10.15

    After async test support was added to this version of XCTest in #331, the Swift async/await feature became available in older Apple OSes, and on macOS specifically it changed from requiring 12.0 to 10.15. So this lowers the availability of all macOS 12.0 requirements of async APIs to 10.15.

    opened by stmontgomery 2
  • XCTest: Stdio not output at correct point

    XCTest: Stdio not output at correct point

    Describe the bug Stdio output appears to be buffered and not outputting at correct time. The easiest way to reproduce this is create a test which outputs a lot of text. You'll find that the text output appears after the TestSuite passed message. This only happens when running swift from the command line.

    Steps To Reproduce Steps to reproduce the behavior:

    1. Create package which includes the following test
        func testPrint() {
            for i in 1..<100 {
                let string = (0..<i).map(\.description).joined()
                print(string)
            }
        }
    }
    
    1. Run swift test

    Expected behavior Print out of numbers should appear before TestSuite passed message.

    Environment (please fill out the following information)

    • OS: macOS 12.4
    • Xcode: 13.4
    • swift-driver version: 1.45.2 Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12) Target: arm64-apple-macosx12.0
    bug 
    opened by adam-fowler 7
  • Support async calls with XCTAssertNoThrow, XCTAssertThrowsError, XCTExpectFailure...

    Support async calls with XCTAssertNoThrow, XCTAssertThrowsError, XCTExpectFailure...

    Hello,

    I'm trying to use XCTAssertNoThrow method with async function. I'm trying to use it as this:

            XCTAssertNoThrow {
                let item = try await map.getItem(with: "āž$*")
                XCTAssertNil(item)
            }
    

    It turns out the callback is never run. In my case try returns with an error, which is thrown from getItem.

    I ended up with this solution, which is suboptimal:

            var caughtError: Error?
            do {
                let item = try await map.getItem(with: "āž$*")
                XCTAssertNil(item)
            } catch {
                caughtError = error
            }
            XCTExpectFailure("test fails for the time being") {
                XCTAssertNil(caughtError)
            }
    

    Side note: XCTExpectFailure doesn't run the async closure as well.

    opened by Gray-Wind 0
  • Invoking `XCTContext.runActivity` from an `async` test causes runtime error

    Invoking `XCTContext.runActivity` from an `async` test causes runtime error

    When creating an activity from an async test, it causes NSInternalInconsistencyException with message Current context must not be nil:

    Current context must not be nil ( 0 CoreFoundation 0x00000001a2f291a8 exceptionPreprocess + 240 1 libobjc.A.dylib 0x00000001a2c73e04 objc_exception_throw + 60 2 Foundation 0x00000001a3e60e88 -[NSCalendarDate initWithCoder:] + 0 3 XCTestCore 0x0000000100ca92a0 +[XCTContext currentContextInThread:] + 164 4 XCTestCore 0x0000000100ca76bc +[XCTContext currentContext] + 72 5 libXCTestSwiftSupport.dylib 0x0000000119f628c4 $sSo10XCTContextC6XCTestE11runActivity5named5blockxSS_xSo11XCTActivity_pKXEtKlFZ + 64 6 AsyncObjectsTests 0x000000011cf71ef0 $s17AsyncObjectsTests09TaskQueueC0C12testactivityyyYaKF + 216 7 AsyncObjectsTests 0x000000011cf72185 $s17AsyncObjectsTests09TaskQueueC0C12testactivityyyYaKFyyYacfU_ToTQ0 + 1 8 AsyncObjectsTests 0x000000011cf74375 $s17AsyncObjectsTests09TaskQueueC0C12testactivityyyYaKFyyYacfU_ToTATQ0 + 1 9 AsyncObjectsTests 0x000000011ceddabd $sIeghH_ytIeghHr_TRTQ0_ + 1 10 AsyncObjectsTests 0x000000011cede0c1 $sIeghH_ytIeghHr_TRTATQ0_ + 1 11 AsyncObjectsTests 0x000000011ceddbd1 $sxIeghHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tgq5TQ0_ + 1 12 AsyncObjectsTests 0x000000011cede249 $sxIeghHr_xs5Error_pIegHrzo_s8SendableRzs5NeverORs_r0_lTRyt_Tgq5TATQ0_ + 1 13 libswift_Concurrency.dylib 0x0000000223616ea1 _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1 )

    Here is a sample test that reproduces this error on Xcode 13.4.1 on macOS version 12.5:

    func testactivity() async throws {
        XCTContext.runActivity(named: "test 1") { activity in
            XCTAssertTrue(true)
        }
    }
    

    Just removing the async specifier resolves the issue.

    opened by soumyamahunt 1
Releases(swift-4.2.2-RELEASE)
Owner
Apple
Apple
Test-To-Do-List - Test To Do List with core data

test-To-Do-List This is my first pet project with core data Launch screen Main s

Artem 0 Feb 26, 2022
XCTestExtensions is a Swift extension that provides convenient assertions for writing Unit Test.

XCTestExtensions Features XCTAssertEventually (that convenient assertions for writing Unit Test). Use "XCTAssertEventually", you can write asynchronou

shindyu 22 Dec 1, 2022
Write unit tests which test the layout of a view in multiple configurations

Overview This library enables you to write unit tests which test the layout of a view in multiple configurations. It tests the view with different dat

LinkedIn 565 Nov 16, 2022
I built this application with unit testing and test-driven development to understand TDD theory and practice

TestDrivenDevelopment Description I built this application with unit testing and test-driven development to understand TDD theory and practice, to wri

null 1 Dec 21, 2021
A simple and lightweight matching library for XCTest framework.

Match A simple and lightweight matching library for XCTest framework. Getting started Swift Package Manager You can add Match to your project by addin

Michał Tynior 6 Oct 23, 2022
Swift framework containing a set of helpful XCTest extensions for writing UI automation tests

AutoMate • AppBuddy • Templates • ModelGenie AutoMate AutoMate is a Swift framework containing a set of helpful XCTest extensions for writing UI autom

PGS Software 274 Dec 30, 2022
XCTestCrashDemo - XCTest Crash Demo with swift

XCTest Crash Demo This repo intends to centralize XCTest crash errors and the wa

Omar Zúñiga 0 Jan 3, 2022
Assertions for XCTest which prevent fatal errors causing the process to die.

Hela Assertions for XCTest which prevent fatal errors causing the process to die. The following assertions are supported. These functions are built on

Brennan Stehling 3 Nov 7, 2022
Kfm-ios-test - Test online for iOS Developer position in Kimia Farma or PT. Buana Varia Komputama

kfm-ios-test Kimia Farma Mobile iOS Test Test online for iOS Developer position

Erwindo Sianipar 3 Feb 23, 2022
Library for unifying the approach to network mocking in iOS unit- & UI-tests.

TinkoffMockStrapping Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installati

Online financial ecosystem 22 Jan 3, 2023
A Mac and iOS Playgrounds Unit Testing library based on Nimble.

Spry Spry is a Swift Playgrounds Unit Testing library based on Nimble. The best thing about Spry is that the API matches Nimble perfectly. Which means

Quick 327 Jul 24, 2022
Test case project for mackolik

Mackolik - iOS Developer - Test Case Gökhan Mandacı 28 Oct 2021 I developed a two-page app and a general purpose drop down widget for the Mackolik Tes

Gökhan Mandacı 0 Oct 28, 2021
Mockit is a Tasty mocking framework for unit tests in Swift 5.0

Mockit Introduction Mockit is a Tasty mocking framework for unit tests in Swift 5.0. It's at an early stage of development, but its current features a

Syed Sabir Salman-Al-Musawi 118 Oct 17, 2022
Trying to implement Unit Tests for @Binding properties in a ViewModel

BindingTester Trying to implement Unit Tests for @Binding properties in a ViewModel ViewModel to be tested class SheetViewModel: ObservableObject {

Raphael Guye 0 Oct 22, 2021
Catching fatal errors in unit tests

Precondition Catching When running tests which hit fatal errors, often preconditions the built-in support with XCTest. One package which supports cach

Brennan Stehling 0 Nov 28, 2021
Runtime introspection and unit testing of SwiftUI views

ViewInspector ??️‍♂️ for SwiftUI ViewInspector is a library for unit testing SwiftUI views. It allows for traversing a view hierarchy at runtime provi

Alexey Naumov 1.5k Jan 8, 2023
Snapshot view unit tests for iOS

iOSSnapshotTestCase (previously FBSnapshotTestCase) What it does A "snapshot test case" takes a configured UIView or CALayer and uses the necessary UI

Uber Open Source 1.7k Jan 4, 2023
TestSchedulerDemo - Demonstration code for iOS Unit Tests and Asynchronous

TestSchedulerDemo This repository contains demonstration code for my Medium arti

Carsten Wenderdel 0 Mar 19, 2022
Marvel - Marvel Characters App using MVVM, and including unit tests

Marvel About The purpose of this project is to develop a app using MVVM, and inc

null 1 Mar 20, 2022