Files
swift-mirror/test/Interop/Cxx/stdlib/libcxx-symbolic-module-interface.swift
Egor Zhdan 8ef468c5f1 [cxx-interop] Fix libc++ tests
These two tests require execution privileges in order to run `check-libcxx-version`, which is used to restrict the tests to a range of libc++ versions. They were failing on `non_executable` CI jobs because of missing `// REQUIRES: executable_test`.

rdar://145821727
2025-03-12 19:51:58 +00:00

31 lines
1.3 KiB
Swift

// Only run this test with older libc++, before the top-level std module got split into multiple top-level modules.
// RUN: %empty-directory(%t)
// RUN: %target-clangxx %S/Inputs/check-libcxx-version.cpp -o %t/check-libcxx-version
// RUN: %target-codesign %t/check-libcxx-version
// RUN: %target-swift-ide-test -print-module -module-to-print=CxxStdlib -source-filename=x -enable-experimental-cxx-interop -enable-objc-interop -module-print-submodules -enable-experimental-feature ImportSymbolicCXXDecls > %t/result.txt
// RUN: %target-run %t/check-libcxx-version || %FileCheck %s --check-prefixes=CHECK,VECTOR --input-file=%t/result.txt
// RUN: %target-run %t/check-libcxx-version || %FileCheck %s --check-prefixes=CHECK,STRING --input-file=%t/result.txt
// RUN: %target-run %t/check-libcxx-version || %FileCheck %s --check-prefixes=CHECK,MAP --input-file=%t/result.txt
// REQUIRES: OS=macosx
// REQUIRES: swift_feature_ImportSymbolicCXXDecls
// Since this test runs check-libcxx-version, it requires execution.
// REQUIRES: executable_test
// CHECK: enum std {
// CHECK: enum __1 {
// STRING: struct basic_string {
// STRING: typealias string = std.__1.basic_string
// VECTOR: struct vector {
// VECTOR: mutating func push_back(_ __x: Any)
// VECTOR: }
// MAP: struct map {
// CHECK-NOT: enum std