Files
swift-mirror/validation-test/execution/dsohandle-multi-module.swift
Saleem Abdulrasool db9a6cae4d validation-test: refactor the test invocation (NFC)
This just uses the `%target-build-swift-dylib` instead of
`%target-build-swift` substitution along with `%target-library-name` to
ensure that we are target independent.
2019-06-04 13:05:42 -07:00

27 lines
905 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-build-swift-dylib(%t/%target-library-name(first)) %S/Inputs/dsohandle-first.swift -emit-module -module-name first
// RUN: %target-build-swift-dylib(%t/%target-library-name(second)) %S/Inputs/dsohandle-second.swift -emit-module -module-name second
// RUN: %target-build-swift -I %t -L %t -lfirst -lsecond %s -o %t/main
// RUN: %target-codesign %t/main %t/%target-library-name(first) %t/%target-library-name(second)
// RUN: %target-run %t/main %t/%target-library-name(first) %t/%target-library-name(second)
// REQUIRES: executable_test
// UNSUPPORTED: linux
import first
import second
import StdlibUnittest
let DSOHandleTests = TestSuite("DSOHandle")
DSOHandleTests.test("Unique handles for different images") {
let firstHandle = getFirstDSOHandle()
let secondHandle = getSecondDSOHandle()
expectNotEqual(firstHandle, secondHandle)
}
runAllTests()