Files
swift-mirror/test/ModuleInterface/can-import.swift
Harlan Haskins d3b8ce7ae2 [test] Update ParseableInterface to ModuleInterface
Also remove uses of -emit-parseable-module-interface from tests
2019-09-13 14:55:48 -07:00

14 lines
459 B
Swift

// 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