Skip to content

Commit 770c681

Browse files
authored
Merge pull request #42306 from apple/egorzhdan/libstdcxx-ubuntu18-test-fix
[cxx-interop] Fix libstdc++ test failure with Ubuntu 18.04
2 parents d366fe5 + 4feee3d commit 770c681

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
// RUN: %target-swift-ide-test -print-module -module-to-print=std -source-filename=x -enable-experimental-cxx-interop -module-cache-path %t | %FileCheck %s -check-prefix=CHECK-STD
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-ide-test -print-module -module-to-print=std -source-filename=x -enable-experimental-cxx-interop -module-cache-path %t > %t/interface.swift
3+
// RUN: %FileCheck %s -check-prefix=CHECK-STD < %t/interface.swift
4+
// RUN: %FileCheck %s -check-prefix=CHECK-TO-STRING < %t/interface.swift
5+
// RUN: %FileCheck %s -check-prefix=CHECK-STRING < %t/interface.swift
6+
7+
// Running this test with different versions of libstdc++ will result in the decls being printed in different order.
28

39
// This test is specific to libstdc++ and only runs on platforms where libstdc++ is used.
410
// REQUIRES: OS=linux-gnu
511

6-
// REQUIRES: rdar91518316
7-
812
// CHECK-STD: enum std {
913
// CHECK-STD: enum __cxx11 {
1014
// CHECK-STD: struct __CxxTemplateInstNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE {
@@ -15,11 +19,11 @@
1519
// CHECK-STD: }
1620
// CHECK-STD: }
1721

18-
// CHECK-STD: static func to_string(_ __val: Int32) -> std.string
19-
// CHECK-STD: static func to_wstring(_ __val: Int32) -> std.wstring
22+
// CHECK-TO-STRING: static func to_string(_ __val: Int32) -> std{{(.__cxx11)?}}.string
23+
// CHECK-TO-STRING: static func to_wstring(_ __val: Int32) -> std{{(.__cxx11)?}}.wstring
2024

2125
// CHECK-STD: typealias size_t = Int
2226

23-
// CHECK-STD: typealias string = std.__cxx11.__CxxTemplateInstNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
24-
// CHECK-STD: typealias wstring = std.__cxx11.__CxxTemplateInstNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE
27+
// CHECK-STRING: typealias string = std.__cxx11.__CxxTemplateInstNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
28+
// CHECK-STRING: typealias wstring = std.__cxx11.__CxxTemplateInstNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE
2529
// CHECK-STD: }

0 commit comments

Comments
 (0)