Skip to content

test: add a C++ interop test for the msvcprt module #59867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions test/Interop/Cxx/stdlib/msvcprt-module-interface.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// RUN: %empty-directory(%t)
// RUN: %target-swift-ide-test -print-module -module-to-print std -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=std.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: }