Fixed issues encountered in the unit tests target after the project transitioned to Swift 6 and strict concurrency.
This commit is contained in:
@@ -3,6 +3,7 @@ import Testing
|
||||
|
||||
@testable import Todos
|
||||
|
||||
@MainActor
|
||||
@Suite("TodoGroup enumeration tests")
|
||||
struct TodoGroupTests {
|
||||
|
||||
@@ -11,7 +12,7 @@ struct TodoGroupTests {
|
||||
@Test(
|
||||
"canShowCompleted returns correct values",
|
||||
arguments: zip(
|
||||
TodoGroup.allCases,
|
||||
[TodoGroup.today, .upcoming, .overdue, .completed],
|
||||
[true, true, true, false]
|
||||
)
|
||||
)
|
||||
@@ -30,7 +31,7 @@ struct TodoGroupTests {
|
||||
@Test(
|
||||
"canReorder returns correct values",
|
||||
arguments: zip(
|
||||
TodoGroup.allCases,
|
||||
[TodoGroup.today, .upcoming, .overdue, .completed],
|
||||
[true, true, true, false]
|
||||
)
|
||||
)
|
||||
@@ -49,7 +50,7 @@ struct TodoGroupTests {
|
||||
@Test(
|
||||
"group color match expected values",
|
||||
arguments: zip(
|
||||
TodoGroup.allCases,
|
||||
[TodoGroup.today, .upcoming, .overdue, .completed],
|
||||
[Color.blue, .green, .red, .gray]
|
||||
)
|
||||
)
|
||||
@@ -68,7 +69,7 @@ struct TodoGroupTests {
|
||||
@Test(
|
||||
"group icon names match expected values",
|
||||
arguments: zip(
|
||||
TodoGroup.allCases,
|
||||
[TodoGroup.today, .upcoming, .overdue, .completed],
|
||||
["calendar.badge.clock", "calendar", "calendar.badge.exclamationmark", "checkmark.circle.fill"]
|
||||
)
|
||||
)
|
||||
@@ -87,7 +88,7 @@ struct TodoGroupTests {
|
||||
@Test(
|
||||
"group titles match expected values",
|
||||
arguments: zip(
|
||||
TodoGroup.allCases,
|
||||
[TodoGroup.today, .upcoming, .overdue, .completed],
|
||||
["today", "upcoming", "overdue", "completed"]
|
||||
)
|
||||
)
|
||||
@@ -123,7 +124,10 @@ struct TodoGroupTests {
|
||||
|
||||
// MARK: Identifiable Tests
|
||||
|
||||
@Test("id returns an identity of a case", arguments: TodoGroup.allCases)
|
||||
@Test(
|
||||
"id returns an identity of a case",
|
||||
arguments: [TodoGroup.today, .upcoming, .overdue, .completed]
|
||||
)
|
||||
func id(for group: TodoGroup) {
|
||||
// GIVEN
|
||||
// WHEN
|
||||
|
||||
Reference in New Issue
Block a user