Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
stephencelis committed May 7, 2024
1 parent ea54b46 commit 1e9db2e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Tests/DependenciesTests/AssertTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ import XCTest

final class AssertTests: XCTestCase {
@Dependency(\.assert) var assert
@Dependency(\.precondition) var precondition

func testPass() {
assert(true)
assert(true, "Must be true")
precondition(true)
precondition(true, "Must be true")
}

func testFail() {
Expand All @@ -18,6 +21,14 @@ final class AssertTests: XCTestCase {
} issueMatcher: {
$0.compactDescription == "Must be true"
}
XCTExpectFailure {
precondition(false)
}
XCTExpectFailure {
precondition(false, "Must be true")
} issueMatcher: {
$0.compactDescription == "Must be true"
}
}

func testCustom() {
Expand Down

0 comments on commit 1e9db2e

Please sign in to comment.