File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Tests/SystemCompatibilityAdaptorTests Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 11#if canImport(System) && canImport(SystemPackage)
22
3- import XCTest
3+ import Testing
44
55import SystemPackage
66import System
77
88import SystemCompatibilityAdaptors
99
10- final class SystemCompatibilityAdaptorTests : XCTestCase {
10+ @Suite ( " CompatibilityAdaptors " )
11+ private struct CompatibilityAdaptorTests {
1112
12- func testFilePathAdaptor( ) {
13+ @available ( System 0 . 0 . 2 , * )
14+ @Test
15+ func filePathAdaptor( ) throws {
1316 let fp = SystemPackage . FilePath ( " /bar " )
1417
1518 let sfp = System . FilePath ( converting: fp)
1619
1720 // If we had access to the underlying array as API, this would look less silly
18- XCTAssertEqual ( fp, SystemPackage . FilePath ( converting: sfp) )
21+ #expect ( fp == SystemPackage . FilePath ( converting: sfp) )
1922 }
2023
21- func testFileDescriptorAdaptor( ) throws {
24+ @available ( System 0 . 0 . 1 , * )
25+ @Test
26+ func fileDescriptorAdaptor( ) throws {
2227 let fd = try SystemPackage . FileDescriptor. standardInput. duplicate ( )
2328
2429 let sfd : System . FileDescriptor = System . FileDescriptor ( converting: fd)
2530
26- print ( fd. rawValue)
27- XCTAssertEqual ( fd. rawValue, sfd. rawValue)
31+ #expect( fd. rawValue == sfd. rawValue)
2832 }
2933}
3034#endif // canImport(System) && canImport(SystemPackage)
You can’t perform that action at this time.
0 commit comments