Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Commit b1ffc80

Browse files
committed
Remove deprecated assert method
1 parent 9ac47d3 commit b1ffc80

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

Diff for: Library/Core/Validatable.swift

-20
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,3 @@ public protocol Validatable {
2727
*/
2828
static func validate() throws
2929
}
30-
31-
extension Validatable {
32-
/**
33-
Validates this entity and asserts if it encounters a invalid situation, a validatable should also validate it sub-validatables if it has any. In -O builds (the default for Xcode's Release configuration), validation is not evaluated, and there are no effects.
34-
*/
35-
@available(*, deprecated, message: "Use validate() instead, preferably from a testcase.")
36-
public static func assertValid() {
37-
assert( theRealAssert() )
38-
}
39-
40-
fileprivate static func theRealAssert() -> Bool {
41-
do {
42-
try validate()
43-
} catch {
44-
assertionFailure("Validation of \(type(of: self)) failed with error: \(error)")
45-
}
46-
47-
return true
48-
}
49-
}

0 commit comments

Comments
 (0)