mirror of
https://github.com/samsonjs/Peekaboo.git
synced 2026-04-27 15:07:41 +00:00
Apply SwiftFormat to new test files
- Fix import ordering (XCTest after module imports) - Add missing newlines at end of files - Fix number formatting (underscore separators) - Apply consistent formatting to switch statements
This commit is contained in:
parent
f4a41f8355
commit
8894154be6
5 changed files with 185 additions and 187 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import XCTest
|
||||
@testable import peekaboo
|
||||
import XCTest
|
||||
|
||||
final class ApplicationFinderTests: XCTestCase {
|
||||
var applicationFinder: ApplicationFinder!
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import XCTest
|
||||
import ArgumentParser
|
||||
@testable import peekaboo
|
||||
import XCTest
|
||||
|
||||
final class ImageCommandTests: XCTestCase {
|
||||
|
||||
// MARK: - Command Parsing Tests
|
||||
|
||||
func testImageCommandParsing() throws {
|
||||
|
|
@ -129,7 +128,7 @@ final class ImageCommandTests: XCTestCase {
|
|||
func testGenerateFilename() {
|
||||
// Test filename generation with pattern
|
||||
let pattern = "{app}_{mode}_{timestamp}"
|
||||
let date = Date(timeIntervalSince1970: 1700000000) // Fixed date for testing
|
||||
let date = Date(timeIntervalSince1970: 1_700_000_000) // Fixed date for testing
|
||||
|
||||
// Mock the filename generation logic
|
||||
let formatter = DateFormatter()
|
||||
|
|
@ -184,7 +183,7 @@ final class ImageCommandTests: XCTestCase {
|
|||
metadata: ImageMetadata(
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
fileSize: 1024000,
|
||||
fileSize: 1_024_000,
|
||||
format: "png",
|
||||
colorSpace: "sRGB",
|
||||
bitsPerPixel: 24,
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
import XCTest
|
||||
import ArgumentParser
|
||||
@testable import peekaboo
|
||||
import XCTest
|
||||
|
||||
final class ListCommandTests: XCTestCase {
|
||||
|
||||
// MARK: - Command Parsing Tests
|
||||
|
||||
func testListCommandParsing() throws {
|
||||
|
|
@ -182,7 +181,7 @@ final class ListCommandTests: XCTestCase {
|
|||
let specifier = WindowSpecifier.app("Finder")
|
||||
|
||||
switch specifier {
|
||||
case .app(let name):
|
||||
case let .app(name):
|
||||
XCTAssertEqual(name, "Finder")
|
||||
default:
|
||||
XCTFail("Expected app specifier")
|
||||
|
|
@ -194,7 +193,7 @@ final class ListCommandTests: XCTestCase {
|
|||
let specifier = WindowSpecifier.windowId(123)
|
||||
|
||||
switch specifier {
|
||||
case .windowId(let id):
|
||||
case let .windowId(id):
|
||||
XCTAssertEqual(id, 123)
|
||||
default:
|
||||
XCTFail("Expected windowId specifier")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import XCTest
|
||||
@testable import peekaboo
|
||||
import XCTest
|
||||
|
||||
final class PermissionsCheckerTests: XCTestCase {
|
||||
var permissionsChecker: PermissionsChecker!
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import XCTest
|
||||
@testable import peekaboo
|
||||
import XCTest
|
||||
|
||||
final class WindowManagerTests: XCTestCase {
|
||||
var windowManager: WindowManager!
|
||||
|
|
|
|||
Loading…
Reference in a new issue