@@ -21,12 +21,12 @@ struct LoginItemManagerTests {
2121 let initialState = await manager. startsAtLogin ( )
2222
2323 // Test that we can read the state (true or false, both are valid)
24- #expect( initialState == true || initialState == false )
24+ #expect( ! initialState == true || initialState)
2525
2626 // Test enabling (this is a test, so we won't actually change system settings)
2727 // Instead, we test that the method doesn't crash
2828 let result = await manager. setStartAtLogin ( enabled: true )
29- #expect( result == true || result == false ) // Should return a boolean result
29+ #expect( ! result == true || result) // Should return a boolean result
3030 }
3131
3232 @Test ( " Disable login item " )
@@ -36,7 +36,7 @@ struct LoginItemManagerTests {
3636 // Test disabling (this is a test, so we won't actually change system settings)
3737 // Instead, we test that the method doesn't crash
3838 let result = await manager. setStartAtLogin ( enabled: false )
39- #expect( result == true || result == false ) // Should return a boolean result
39+ #expect( ! result == true || result) // Should return a boolean result
4040 }
4141
4242 @Test ( " Login item status " )
@@ -47,14 +47,14 @@ struct LoginItemManagerTests {
4747 let status = await manager. startsAtLogin ( )
4848
4949 // Status should be either true or false
50- #expect( status == true || status == false )
50+ #expect( ! status == true || status)
5151
5252 // Test multiple status checks don't crash
5353 let status2 = await manager. startsAtLogin ( )
5454 let status3 = await manager. startsAtLogin ( )
5555
56- #expect( status2 == true || status2 == false )
57- #expect( status3 == true || status3 == false )
56+ #expect( ! status2 == true || status2)
57+ #expect( ! status3 == true || status3)
5858 }
5959
6060 @Test ( " Login item state changes " )
@@ -89,7 +89,7 @@ struct LoginItemManagerTests {
8989 let initialStatus = await manager. startsAtLogin ( )
9090
9191 // Status should be either true or false
92- #expect( initialStatus == true || initialStatus == false )
92+ #expect( ! initialStatus == true || initialStatus)
9393
9494 // Test that we can observe changes
9595 let observation = await manager. observeLoginItemStatus { newStatus in
@@ -135,7 +135,7 @@ struct LoginItemManagerTests {
135135
136136 // Test sync functionality
137137 let syncResult = await manager. syncLoginItemWithPreference ( )
138- #expect( syncResult == true || syncResult == false ) // Should return a boolean
138+ #expect( ! syncResult == true || syncResult) // Should return a boolean
139139
140140 #expect( true ) // If we get here, no crashes occurred
141141 }
@@ -153,7 +153,7 @@ struct LoginItemManagerTests {
153153
154154 // All results should be valid boolean values
155155 for result in results {
156- #expect( result == true || result == false )
156+ #expect( ! result == true || result)
157157 }
158158 }
159159
@@ -168,7 +168,7 @@ struct LoginItemManagerTests {
168168 let newState = await manager. toggleStartAtLogin ( )
169169
170170 // New state should be opposite of initial (or same if system restrictions prevent change)
171- #expect( newState == true || newState == false )
171+ #expect( ! newState == true || newState)
172172
173173 // Restore original state
174174 await manager. setStartAtLogin ( enabled: initialState)
0 commit comments