Files
swift-mirror/test/Interop/Cxx/stdlib/msvcprt-module-interface.swift
Egor Zhdan e3c58386b7 [cxx-interop] Recognize CxxStdlib as an alias for std
C++ standard library module is called `std`. To make it more clear to a Swift developer that this module is a C++ stdlib, and not a Swift stdlib, let's rename it to `CxxStdlib`.

This is the first step in the module rename. We don't ban `std` in this patch to be able to build SwiftCompilerSources with hosttools until a new Swift compiler is shipped.
2022-09-15 14:37:38 +01:00

25 lines
1.2 KiB
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-ide-test -print-module -module-to-print CxxStdlib -source-filename none -enable-experimental-cxx-interop -module-cache-path %t | %FileCheck %s -check-prefix CHECK-STD
// RUN: %target-swift-ide-test -print-module -module-to-print=CxxStdlib.string -source-filename=x -enable-experimental-cxx-interop -module-cache-path %t | %FileCheck %s -check-prefix CHECK-STRING
// This test is specific to msvcprt and therefore only runs on Windows.
// REQUIRES: OS=windows-msvc
// CHECK-STD: import std.iosfwd
// CHECK-STD: import std.string
// CHECK-STRING: enum std {
// CHECK-STRING: typealias size_t = size_t
// CHECK-STRING: static func to_string(_ _Val: Int32) -> std.string
// CHECK-STRING: static func to_wstring(_ _Val: Int32) -> std.wstring
// CHECK-STRING: struct __CxxTemplateInstSs {
// CHECK-STRING: typealias value_type = CChar
// CHECK-STRING: }
// CHECK-STRING: struct __CxxTemplateInstSbIwSt11char_traitsIwESaIwEE {
// CHECK-STRING: typealias value_type = CWideChar
// CHECK-STRING: }
// CHECK-STRING: typealias string = std.__CxxTemplateInstSs
// CHECK-STRING: typealias wstring = std.__CxxTemplateInstSbIwSt11char_traitsIwESaIwEE
// CHECK-STRING: }