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

Commit cb3113e

Browse files
committed
Deprecate assertValid method on Validatables
Calling validate() from a test is a much better option then using assertions.
1 parent 291d004 commit cb3113e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: Library/Core/Validatable.swift

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ extension Validatable {
3131
/**
3232
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.
3333
*/
34+
@available(*, deprecated, message="Use validate() instead, preferably from a testcase.")
3435
public static func assertValid() {
3536
assert( theRealAssert() )
3637
}

0 commit comments

Comments
 (0)