@@ -1637,7 +1637,6 @@ class DataTests : XCTestCase {
16371637 func test_InlineDataSpan( ) throws {
16381638 guard #available( FoundationSpan 6 . 2 , * ) else { throw XCTSkip ( " Span not available " ) }
16391639
1640- #if compiler(>=6.2) && $InoutLifetimeDependence && $LifetimeDependenceMutableAccessors
16411640 var source = Data ( )
16421641 var span = source. span
16431642 XCTAssertTrue ( span. isEmpty)
@@ -1647,18 +1646,15 @@ class DataTests : XCTestCase {
16471646 XCTAssertFalse ( span. isEmpty)
16481647 XCTAssertEqual ( span. count, source. count)
16491648 XCTAssertEqual ( span [ 0 ] , 1 )
1650- #endif
16511649 }
16521650
16531651 func test_InlineSliceDataSpan( ) throws {
16541652 guard #available( FoundationSpan 6 . 2 , * ) else { throw XCTSkip ( " Span not available " ) }
16551653
1656- #if compiler(>=6.2) && $InoutLifetimeDependence && $LifetimeDependenceMutableAccessors
16571654 let source = Data ( 0 ... . max)
16581655 let span = source. span
16591656 XCTAssertEqual ( span. count, source. count)
16601657 XCTAssertEqual ( span [ span. indices. last!] , . max)
1661- #endif
16621658 }
16631659
16641660 func test_LargeSliceDataSpan( ) throws {
@@ -1672,19 +1668,16 @@ class DataTests : XCTestCase {
16721668 #error("This test needs updating")
16731669#endif
16741670
1675- #if compiler(>=6.2) && $InoutLifetimeDependence && $LifetimeDependenceMutableAccessors
16761671 let source = Data ( repeating: 0 , count: count) . dropFirst ( )
16771672 XCTAssertNotEqual ( source. startIndex, 0 )
16781673 let span = source. span
16791674 XCTAssertFalse ( span. isEmpty)
1680- #endif
16811675 }
16821676
16831677 func test_InlineDataMutableSpan( ) throws {
16841678 guard #available( FoundationSpan 6 . 2 , * ) else { throw XCTSkip ( " Span not available " ) }
16851679
16861680#if !canImport(Darwin) || FOUNDATION_FRAMEWORK
1687- #if compiler(>=6.2) && $InoutLifetimeDependence && $LifetimeDependenceMutableAccessors
16881681 var source = Data ( )
16891682 var span = source. mutableSpan
16901683 XCTAssertTrue ( span. isEmpty)
@@ -1700,15 +1693,13 @@ class DataTests : XCTestCase {
17001693 var sub = span. extracting ( i ..< i+ 1 )
17011694 sub. update ( repeating: v)
17021695 XCTAssertEqual ( source [ i] , v)
1703- #endif
17041696#endif
17051697 }
17061698
17071699 func test_InlineSliceDataMutableSpan( ) throws {
17081700 guard #available( FoundationSpan 6 . 2 , * ) else { throw XCTSkip ( " Span not available " ) }
17091701
17101702#if !canImport(Darwin) || FOUNDATION_FRAMEWORK
1711- #if compiler(>=6.2) && $InoutLifetimeDependence && $LifetimeDependenceMutableAccessors
17121703 var source = Data ( 0 ..< 100 )
17131704 let count = source. count
17141705 var span = source. mutableSpan
@@ -1717,7 +1708,6 @@ class DataTests : XCTestCase {
17171708 var sub = span. extracting ( i..< i+ 1 )
17181709 sub. update ( repeating: . max)
17191710 XCTAssertEqual ( source [ i] , . max)
1720- #endif
17211711#endif
17221712 }
17231713
@@ -1733,7 +1723,6 @@ class DataTests : XCTestCase {
17331723#endif
17341724
17351725#if !canImport(Darwin) || FOUNDATION_FRAMEWORK
1736- #if compiler(>=6.2) && $InoutLifetimeDependence && $LifetimeDependenceMutableAccessors
17371726 var source = Data ( repeating: 0 , count: count) . dropFirst ( )
17381727 XCTAssertNotEqual ( source. startIndex, 0 )
17391728 count = source. count
@@ -1743,14 +1732,12 @@ class DataTests : XCTestCase {
17431732 span [ i] = . max
17441733 XCTAssertEqual ( source [ i] , 0 )
17451734 XCTAssertEqual ( source [ i+ 1 ] , . max)
1746- #endif
17471735#endif
17481736 }
17491737
17501738 func test_InlineDataMutableRawSpan( ) throws {
17511739 guard #available( FoundationSpan 6 . 2 , * ) else { throw XCTSkip ( " Span not available " ) }
17521740
1753- #if compiler(>=6.2) && $InoutLifetimeDependence && $LifetimeDependenceMutableAccessors
17541741 var source = Data ( )
17551742 var span = source. mutableBytes
17561743 XCTAssertTrue ( span. isEmpty)
@@ -1765,21 +1752,18 @@ class DataTests : XCTestCase {
17651752 var sub = span. extracting ( i..< i+ 1 )
17661753 sub. storeBytes ( of: v, as: UInt8 . self)
17671754 XCTAssertEqual ( source [ i] , v)
1768- #endif
17691755 }
17701756
17711757 func test_InlineSliceDataMutableRawSpan( ) throws {
17721758 guard #available( FoundationSpan 6 . 2 , * ) else { throw XCTSkip ( " Span not available " ) }
17731759
1774- #if compiler(>=6.2) && $InoutLifetimeDependence && $LifetimeDependenceMutableAccessors
17751760 var source = Data ( 0 ..< 100 )
17761761 let count = source. count
17771762 var span = source. mutableBytes
17781763 XCTAssertEqual ( span. byteCount, count)
17791764 let i = try XCTUnwrap ( span. byteOffsets. randomElement ( ) )
17801765 span. storeBytes ( of: - 1 , toByteOffset: i, as: Int8 . self)
17811766 XCTAssertEqual ( source [ i] , . max)
1782- #endif
17831767 }
17841768
17851769 func test_LargeSliceDataMutableRawSpan( ) throws {
@@ -1793,7 +1777,6 @@ class DataTests : XCTestCase {
17931777 #error("This test needs updating")
17941778#endif
17951779
1796- #if compiler(>=6.2) && $InoutLifetimeDependence && $LifetimeDependenceMutableAccessors
17971780 var source = Data ( repeating: 0 , count: count) . dropFirst ( )
17981781 XCTAssertNotEqual ( source. startIndex, 0 )
17991782 count = source. count
@@ -1803,7 +1786,6 @@ class DataTests : XCTestCase {
18031786 span. storeBytes ( of: - 1 , toByteOffset: i, as: Int8 . self)
18041787 XCTAssertEqual ( source [ i] , 0 )
18051788 XCTAssertEqual ( source [ i+ 1 ] , . max)
1806- #endif
18071789 }
18081790
18091791 #if false // FIXME: XCTest doesn't support crash tests yet rdar://20195010&22387653
0 commit comments