Added the "canShowCompleted" computed property to the TodoGroup enumeration in the app target.

This commit is contained in:
2026-02-10 17:21:59 +01:00
parent 2a3323b8e6
commit cacbcad8c9
2 changed files with 51 additions and 1 deletions
@@ -9,6 +9,25 @@ struct TodoGroupTests {
// MARK: Computed tests
@Test(
"canShowCompleted returns correct values",
arguments: zip(
TodoGroup.allCases,
[true, true, true, false]
)
)
func canShowCompleted(
for group: TodoGroup,
expects expectation: Bool
) {
// GIVEN
// WHEN
let canShowCompleted = group.canShowCompleted
// THEN
#expect(canShowCompleted == expectation)
}
@Test(
"group color match expected values",
arguments: zip(