@@ -164,14 +164,13 @@ struct PIFBuilderTests {
164164
165165 for platform in ProjectModel . BuildSettings. Platform. allCases {
166166 let ld_flags = releaseConfig. settings [ . OTHER_LDFLAGS, platform]
167- if [ . macOS, . macCatalyst, . iOS, . watchOS, . tvOS, . xrOS, . driverKit, . freebsd] . contains ( platform) {
168- #expect( ld_flags == [ " -lc++ " , " $(inherited) " ] , " for platform \( platform) " )
169- } else if [ . android, . linux, . wasi, . openbsd] . contains ( platform) {
170- #expect( ld_flags == [ " -lstdc++ " , " $(inherited) " ] , " for platform \( platform) " )
171- } else if [ . windows, . _iOSDevice] . contains ( platform) {
172- #expect( ld_flags == nil , " for platform \( platform) " )
173- } else {
174- Issue . record ( " Unexpected platform \( platform) " )
167+ switch platform {
168+ case . macOS, . macCatalyst, . iOS, . watchOS, . tvOS, . xrOS, . driverKit, . freebsd:
169+ #expect( ld_flags == [ " -lc++ " , " $(inherited) " ] , " for platform \( platform) " )
170+ case . android, . linux, . wasi, . openbsd:
171+ #expect( ld_flags == [ " -lstdc++ " , " $(inherited) " ] , " for platform \( platform) " )
172+ case . windows, . _iOSDevice:
173+ #expect( ld_flags == nil , " for platform \( platform) " )
175174 }
176175 }
177176 }
0 commit comments