236
236
}
237
237
238
238
func testNavigationTreeLargeDumpAndReadAsync( ) throws {
239
- #if !os(Linux)
240
239
let targetURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) ) . appendingPathComponent ( UUID ( ) . uuidString)
241
240
try FileManager . default. createDirectory ( at: targetURL, withIntermediateDirectories: true , attributes: nil )
242
241
defer {
@@ -279,11 +278,9 @@ Root
279
278
}
280
279
281
280
XCTAssertTrue ( validateTree ( node: readTreePresentationIdentifier. root, validator: presentationIdentifierValidator) , " The tree lacks the presentation identifier. " )
282
- #endif
283
281
}
284
282
285
283
func testNavigatorIndexGenerationEmpty( ) throws {
286
- #if !os(Linux)
287
284
let targetURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) ) . appendingPathComponent ( UUID ( ) . uuidString)
288
285
try FileManager . default. createDirectory ( at: targetURL, withIntermediateDirectories: true , attributes: nil )
289
286
defer {
@@ -300,11 +297,9 @@ Root
300
297
301
298
let readTree = NavigatorTree ( )
302
299
XCTAssertThrowsError ( try readTree. read ( from: indexURL, interfaceLanguages: [ . swift] , timeout: 0.25 , queue: DispatchQueue . main, broadcast: nil ) )
303
- #endif
304
300
}
305
301
306
302
func testNavigatorIndexGenerationOneNode( ) throws {
307
- #if !os(Linux)
308
303
let targetURL = URL ( fileURLWithPath: NSTemporaryDirectory ( ) ) . appendingPathComponent ( UUID ( ) . uuidString)
309
304
try FileManager . default. createDirectory ( at: targetURL, withIntermediateDirectories: true , attributes: nil )
310
305
defer {
@@ -331,11 +326,9 @@ Root
331
326
XCTAssert ( counter == 1 , " The broadcast callback has to be called at exactly 1 time. " )
332
327
XCTAssertEqual ( original. root. countItems ( ) , readTree. root. countItems ( ) )
333
328
XCTAssertTrue ( compare ( lhs: original. root, rhs: readTree. root) )
334
- #endif
335
329
}
336
330
337
331
func testNavigatorIndexGenerationOperator( ) throws {
338
- #if !os(Linux)
339
332
let operatorURL = Bundle . module. url (
340
333
forResource: " Operator " , withExtension: " json " , subdirectory: " Test Resources " ) !
341
334
353
346
builder. finalize ( )
354
347
355
348
XCTAssertNotNil ( builder. navigatorIndex)
356
- #endif
357
349
}
358
350
359
351
func testNavigatorIndexGeneration( ) throws {
513
505
}
514
506
515
507
func testNavigatorIndexGenerationWithLanguageGrouping( ) throws {
516
- #if !os(Linux)
517
508
let ( bundle, context) = try testBundleAndContext ( named: " TestBundle " )
518
509
let renderContext = RenderContext ( documentationContext: context, bundle: bundle)
519
510
let converter = DocumentationContextConverter ( bundle: bundle, context: context, renderContext: renderContext)
557
548
558
549
assertUniqueIDs ( node: navigatorIndex. navigatorTree. root)
559
550
assertEqualDumps ( navigatorIndex. navigatorTree. root. dumpTree ( ) , try testTree ( named: " testNavigatorIndexGenerationWithLanguageGrouping " ) )
560
- #endif
561
551
}
562
552
563
553
625
615
}
626
616
627
617
func testNavigatorIndexAvailabilityGeneration( ) throws {
628
- #if !os(Linux)
629
618
let ( bundle, context) = try testBundleAndContext ( named: " TestBundle " )
630
619
let renderContext = RenderContext ( documentationContext: context, bundle: bundle)
631
620
let converter = DocumentationContextConverter ( bundle: bundle, context: context, renderContext: renderContext)
@@ -720,11 +709,9 @@ Root
720
709
let availabilityDB = try navigatorIndex. environment. openDatabase ( named: " availability " )
721
710
XCTAssertThrowsError ( try availabilityDB. put ( key: " content " , value: " test " ) )
722
711
XCTAssertNil ( availabilityDB. get ( type: String . self, forKey: " content " ) )
723
- #endif
724
712
}
725
713
726
714
func testNavigatorIndexDifferenHasherGeneration( ) throws {
727
- #if !os(Linux)
728
715
let ( bundle, context) = try testBundleAndContext ( named: " TestBundle " )
729
716
let renderContext = RenderContext ( documentationContext: context, bundle: bundle)
730
717
let converter = DocumentationContextConverter ( bundle: bundle, context: context, renderContext: renderContext)
780
767
let sideClassNode = try XCTUnwrap ( search ( node: navigatorIndex. navigatorTree. root) { navigatorIndex. path ( for: $0. id!) == " /documentation/sidekit/sideclass " } )
781
768
let availabilities = navigatorIndex. availabilities ( for: sideClassNode. item. availabilityID)
782
769
XCTAssertEqual ( availabilities. count, 1 )
783
-
784
- #endif
785
770
}
786
771
787
772
func testPlatformVersion( ) {
@@ -1133,7 +1118,6 @@ Root
1133
1118
}
1134
1119
1135
1120
func testNavigatorIndexAsReadOnlyFile( ) throws {
1136
- #if !os(Linux)
1137
1121
let ( bundle, context) = try testBundleAndContext ( named: " TestBundle " )
1138
1122
let converter = DocumentationNodeConverter ( bundle: bundle, context: context)
1139
1123
@@ -1164,7 +1148,6 @@ Root
1164
1148
1165
1149
// Make sure we throw if an index can't be opened even after the fallback, avoiding entering an infinite loop.
1166
1150
XCTAssertThrowsError ( try NavigatorIndex ( url: targetURL, readNavigatorTree: false ) )
1167
- #endif
1168
1151
}
1169
1152
1170
1153
func testNavigatorTitle( ) throws {
0 commit comments