Adopted Swift 6.2 tools version at the Package in the library target to drop legacy conditional code.
This commit is contained in:
@@ -31,7 +31,6 @@ struct AmiiboServiceLiveTests {
|
||||
|
||||
// MARK: Functions tests
|
||||
|
||||
#if swift(>=6.2)
|
||||
@Test(arguments: zip(
|
||||
Input.amiibos,
|
||||
Output.amiibos
|
||||
@@ -180,156 +179,6 @@ struct AmiiboServiceLiveTests {
|
||||
year: 2026
|
||||
)
|
||||
}
|
||||
#else
|
||||
@Test("get amiibos", arguments: zip(
|
||||
Input.amiibos,
|
||||
Output.amiibos
|
||||
))
|
||||
func getAmiibos(
|
||||
filter: AmiiboFilter,
|
||||
expects numberOfItems: Int
|
||||
) async throws {
|
||||
try await assertAmiibos(
|
||||
with: filter,
|
||||
expects: numberOfItems
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get amiibos throws", arguments: zip(
|
||||
Input.amiibosThrows,
|
||||
Output.amiibosThrows
|
||||
))
|
||||
func getAmiibosThrows(
|
||||
filter: AmiiboFilter,
|
||||
expects error: AmiiboServiceError
|
||||
) async throws {
|
||||
try await assertsAmiibosThrows(
|
||||
error: error,
|
||||
when: filter
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get amiibo series", arguments: zip(
|
||||
Input.amiiboSeries,
|
||||
Output.amiiboSeries
|
||||
))
|
||||
func getAmiiboSeries(
|
||||
filter: AmiiboSeriesFilter,
|
||||
expects numberOfItems: Int
|
||||
) async throws {
|
||||
try await assertAmiiboSeries(
|
||||
with: filter,
|
||||
expects: numberOfItems
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get amiibo series throws", arguments: zip(
|
||||
Input.amiiboSeriesThrows,
|
||||
Output.amiiboSeriesThrows
|
||||
))
|
||||
func getAmiiboSeriesThrows(
|
||||
filter: AmiiboSeriesFilter,
|
||||
expects error: AmiiboServiceError
|
||||
) async throws {
|
||||
try await assertsAmiiboSeriesThrows(
|
||||
error: error,
|
||||
when: filter
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get amiibo types", arguments: zip(
|
||||
Input.amiiboTypes,
|
||||
Output.amiiboTypes
|
||||
))
|
||||
func getAmiiboTypes(
|
||||
filter: AmiiboTypeFilter,
|
||||
expects numberOfItems: Int
|
||||
) async throws {
|
||||
try await assertAmiiboTypes(
|
||||
with: filter,
|
||||
expects: numberOfItems
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get amiibo types throws", arguments: zip(
|
||||
Input.amiiboTypesThrows,
|
||||
Output.amiiboTypesThrows
|
||||
))
|
||||
func getAmiiboTypesThrows(
|
||||
filter: AmiiboTypeFilter,
|
||||
expects error: AmiiboServiceError
|
||||
) async throws {
|
||||
try await assertsAmiiboTypesThrows(
|
||||
error: error,
|
||||
when: filter
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get game characters", arguments: zip(
|
||||
Input.gameCharacters,
|
||||
Output.gameCharacters
|
||||
))
|
||||
func getGameCharacters(
|
||||
filter: GameCharacterFilter,
|
||||
expects numberOfItems: Int
|
||||
) async throws {
|
||||
try await assertGameCharacters(
|
||||
with: filter,
|
||||
expects: numberOfItems
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get game characters throws", arguments: zip(
|
||||
Input.gameCharactersThrows,
|
||||
Output.gameCharactersThrows
|
||||
))
|
||||
func getGameCharactersThrows(
|
||||
filter: GameCharacterFilter,
|
||||
expects error: AmiiboServiceError
|
||||
) async throws {
|
||||
try await assertsGameCharactersThrows(
|
||||
error: error,
|
||||
when: filter
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get game series", arguments: zip(
|
||||
Input.gameSeries,
|
||||
Output.gameSeries
|
||||
))
|
||||
func getGameSeries(
|
||||
filter: GameSeriesFilter,
|
||||
expects numberOfItems: Int
|
||||
) async throws {
|
||||
try await assertGameSeries(
|
||||
with: filter,
|
||||
expects: numberOfItems
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get game series throws", arguments: zip(
|
||||
Input.gameSeriesThrows,
|
||||
Output.gameSeriesThrows
|
||||
))
|
||||
func getGameSeriesThrows(
|
||||
filter: GameSeriesFilter,
|
||||
expects error: AmiiboServiceError
|
||||
) async throws {
|
||||
try await assertsGameSeriesThrows(
|
||||
error: error,
|
||||
when: filter
|
||||
)
|
||||
}
|
||||
|
||||
@Test("get last updated timestamp")
|
||||
func getLastUpdated() async throws {
|
||||
try await assertLastUpdated(
|
||||
day: 24,
|
||||
month: 7,
|
||||
year: 2026
|
||||
)
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user