Skip to content

Commit 71b96e9

Browse files
committed
Split out the part of the test that's failing on Windows
1 parent 34545e0 commit 71b96e9

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

test/Interop/C/struct/noncopyable_structs.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Check that we get the expected errors for incorrect uses of noncopyable
32
// imported types with both C and C++ interoperability.
43

@@ -56,13 +55,6 @@ func bad1(_: borrowing BadDestroyNonCopyableType) { }
5655
// expected-warning@+1{{'BadDestroyNonCopyableType2' is deprecated: destroy function 'badDestroy2' must have a single parameter with type 'BadDestroyNonCopyableType2'}}
5756
func bad2(_: borrowing BadDestroyNonCopyableType2) { }
5857

59-
#if !os(Windows)
60-
#if CPLUSPLUS
61-
// expected-cplusplus-warning@+1{{'ExtraDestroy' is deprecated: destroy operation 'extraDestroy' is not allowed on types with a non-trivial destructor}}
62-
func extra(_: borrowing ExtraDestroy) { }
63-
#endif
64-
#endif
65-
6658
#endif
6759

6860
// CHECK-SIL: sil shared @$sSo21NonCopyableWithDeinitVfD : $@convention(method) (@owned NonCopyableWithDeinit) -> () {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Split out from noncopyable_structs.swift due to an issue with Windows.
2+
3+
// RUN: %target-swift-frontend -emit-sil -I %S/Inputs/ -I %swift_src_root/lib/ClangImporter/SwiftBridging %s -verify -DERRORS -verify-additional-prefix conly-
4+
// RUN: %target-swift-frontend -emit-sil -I %S/Inputs/ -I %swift_src_root/lib/ClangImporter/SwiftBridging %s -verify -DERRORS -DCPLUSPLUS -verify-additional-prefix cplusplus- -cxx-interoperability-mode=default
5+
6+
// XFAIL: OS=windows-msvc
7+
import NoncopyableStructs
8+
9+
#if CPLUSPLUS
10+
// expected-cplusplus-warning@+1{{'ExtraDestroy' is deprecated: destroy operation 'extraDestroy' is not allowed on types with a non-trivial destructor}}
11+
func extra(_: borrowing ExtraDestroy) { }
12+
#endif

0 commit comments

Comments
 (0)