Skip to content

Commit ef8debf

Browse files
committed
[NFC] Verify ModuleInterface/objc_implementation
Switch the ModuleInterface/objc_implementation.swift test to using standard substitutions to properly emit its module interface, and make sure it also verifies.
1 parent 143c3a0 commit ef8debf

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

test/ModuleInterface/objc_implementation.swift

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module -I %S/Inputs/objc_implementation -F %clang-importer-sdk-path/frameworks %s -import-underlying-module -swift-version 5 -enable-library-evolution -emit-module-interface-path %t.swiftinterface
2-
// RUN: %FileCheck --input-file %t.swiftinterface %s
3-
// RUN: %FileCheck --input-file %t.swiftinterface --check-prefix NEGATIVE %s
1+
// RUN: %empty-directory(%t)
2+
3+
// FIXME: BEGIN -enable-source-import hackaround
4+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-module -o %t %clang-importer-sdk-path/swift-modules/CoreGraphics.swift
5+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -enable-objc-interop -emit-module -o %t %clang-importer-sdk-path/swift-modules/Foundation.swift
6+
// FIXME: END -enable-source-import hackaround
7+
8+
// RUN: %target-swift-emit-module-interface(%t/objc_implementation.swiftinterface) %s -import-underlying-module %clang-importer-sdk -F %clang-importer-sdk-path/frameworks -I %S/Inputs/objc_implementation
9+
// RUN: %FileCheck --input-file %t/objc_implementation.swiftinterface %s
10+
// RUN: %FileCheck --input-file %t/objc_implementation.swiftinterface --check-prefix NEGATIVE %s
11+
// RUN: %target-swift-typecheck-module-from-interface(%t/objc_implementation.swiftinterface) %clang-importer-sdk -F %clang-importer-sdk-path/frameworks -I %S/Inputs/objc_implementation
12+
413
// REQUIRES: objc_interop
514

15+
import Foundation
16+
617
// We should never see @_objcImplementation in the header
718
// NEGATIVE-NOT: @_objcImplementation
819

0 commit comments

Comments
 (0)