// RUN: %empty-directory(%t)
// RUN: echo 'public func externalFunc() {}' | %target-swift-frontend -typecheck -emit-module-interface-path %t/Library.swiftinterface -
// RUN: %target-swift-frontend -typecheck %s -I %t

#if canImport(Library)
import Library
externalFunc()
#else
#error("unable to import Library from its parseable interface")
#endif

#if canImport(LibraryThatDoesNotExist)
#error("should not return true for library that does not exist")
#endif
// RUN: %empty-directory(%t)
// RUN: echo 'public func externalFunc() {}' | %target-swift-frontend -typecheck -emit-module-interface-path %t/Library.swiftinterface -
// RUN: %empty-directory(%t/LibraryWithoutThisArchitecture.swiftmodule)
// RUN: echo 'public func externalFunc() {}' | %target-swift-frontend -typecheck -emit-module-interface-path %t/LibraryWithoutThisArchitecture.swiftmodule/arm40000-apple-ios.swiftinterface -
// RUN: %target-swift-frontend -typecheck %s -I %t

#if canImport(Library)
import Library
externalFunc()
#else
#error("unable to import Library from its parseable interface")
#endif

#if canImport(LibraryThatDoesNotExist)
#error("should not return true for library that does not exist")
#endif

#if canImport(LibraryWithoutThisArchitecture)
#error("should not return true (or diagnose a loader failure) for library that does not exist")
#endif

Add test case for failure seen in source compat suite
Add test case for failure seen in source compat suite

Master source compat suite job #4912 failed to build ReactiveKit because Combine does not have an interface for older iOS architectures that were retired before it was released, and a change to module loading diagnosis started to consider switfinterfaces. Add a test case that covers this situation.
