Skip to content

Commit a55b190

Browse files
committed
PrintAsObjC Test: Extract what needs Objective-C out of cdecl-official
1 parent bcbdfee commit a55b190

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/// Similar test to cdecl-official but gated to objc-interop compatibility
2+
3+
// RUN: %empty-directory(%t)
4+
// RUN: split-file %S/cdecl-official.swift %t --leading-lines
5+
6+
/// Generate cdecl.h
7+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
8+
// RUN: %t/Lib.swift -emit-module -verify -o %t -emit-module-doc \
9+
// RUN: -emit-clang-header-path %t/cdecl.h \
10+
// RUN: -enable-experimental-feature CDecl
11+
12+
/// Check cdecl.h directly
13+
// RUN: %check-in-clang %t/cdecl.h
14+
// RUN: %check-in-clang-cxx %t/cdecl.h
15+
16+
/// Build an Objective-C client against cdecl.h
17+
// RUN: %clang -c %t/Client.c -fmodules -I %t \
18+
// RUN: -F %S/../Inputs/clang-importer-sdk-path/frameworks \
19+
// RUN: -I %clang-include-dir -Werror \
20+
// RUN: -isysroot %S/../Inputs/clang-importer-sdk
21+
22+
// REQUIRES: swift_feature_CDecl
23+
// REQUIRES: objc_interop

test/PrintAsObjC/cdecl-official.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
/// Generate cdecl.h
55
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) \
66
// RUN: %t/Lib.swift -emit-module -verify -o %t -emit-module-doc \
7-
// RUN: -emit-objc-header-path %t/cdecl.h \
7+
// RUN: -emit-clang-header-path %t/cdecl.h \
88
// RUN: -enable-experimental-feature CDecl
99

1010
/// Check cdecl.h directly
1111
// RUN: %FileCheck %s --input-file %t/cdecl.h
12-
// RUN: %check-in-clang %t/cdecl.h
1312
// RUN: %check-in-clang-c %t/cdecl.h -Wnullable-to-nonnull-conversion
14-
// RUN: %check-in-clang-cxx %t/cdecl.h
1513

1614
/// Build a client against cdecl.h
1715
// RUN: %clang -c %t/Client.c -fmodules -I %t \

0 commit comments

Comments
 (0)