Swiftformat fixes

This commit is contained in:
Arkadiusz Fal
2024-05-16 18:28:32 +02:00
parent 4b21cd48e3
commit 7741e531f4
28 changed files with 57 additions and 65 deletions

View File

@@ -57,7 +57,7 @@ final class URLParserTests: XCTestCase {
]
func testUrlsParsing() throws {
Self.urls.forEach { urlString in
for urlString in Self.urls {
let url = URL(string: urlString)!
let parser = URLParser(url: url)
XCTAssertEqual(parser.destination, .fileURL)
@@ -66,7 +66,7 @@ final class URLParserTests: XCTestCase {
}
func testVideosParsing() throws {
Self.videos.forEach { url, id in
for (url, id) in Self.videos {
let parser = URLParser(url: URL(string: url)!)
XCTAssertEqual(parser.destination, .video)
XCTAssertEqual(parser.videoID, id)
@@ -74,7 +74,7 @@ final class URLParserTests: XCTestCase {
}
func testChannelsByNameParsing() throws {
Self.channelsByName.forEach { url, name in
for (url, name) in Self.channelsByName {
let parser = URLParser(url: URL(string: url)!)
XCTAssertEqual(parser.destination, .channel)
XCTAssertEqual(parser.channelName, name)
@@ -83,7 +83,7 @@ final class URLParserTests: XCTestCase {
}
func testChannelsByIdParsing() throws {
Self.channelsByID.forEach { url, id in
for (url, id) in Self.channelsByID {
let parser = URLParser(url: URL(string: url)!)
XCTAssertEqual(parser.destination, .channel)
XCTAssertEqual(parser.channelID, id)
@@ -92,7 +92,7 @@ final class URLParserTests: XCTestCase {
}
func testUsersParsing() throws {
Self.users.forEach { url, user in
for (url, user) in Self.users {
let parser = URLParser(url: URL(string: url)!)
XCTAssertEqual(parser.destination, .channel)
XCTAssertNil(parser.channelID)
@@ -102,7 +102,7 @@ final class URLParserTests: XCTestCase {
}
func testPlaylistsParsing() throws {
Self.playlists.forEach { url, id in
for (url, id) in Self.playlists {
let parser = URLParser(url: URL(string: url)!)
XCTAssertEqual(parser.destination, .playlist)
XCTAssertEqual(parser.playlistID, id)
@@ -110,7 +110,7 @@ final class URLParserTests: XCTestCase {
}
func testSearchesParsing() throws {
Self.searches.forEach { url, query in
for (url, query) in Self.searches {
let parser = URLParser(url: URL(string: url)!)
XCTAssertEqual(parser.destination, .search)
XCTAssertEqual(parser.searchQuery, query)
@@ -127,7 +127,7 @@ final class URLParserTests: XCTestCase {
"watch?v=IUTGFQpKaPU&t=30s": 30
]
samples.forEach { url, time in
for (url, time) in samples {
XCTAssertEqual(
URLParser(url: URL(string: url)!).time,
time