2015-10-16 23:56:30 +03:00
|
|
|
final class TermTests: XCTestCase {
|
|
|
|
override static func setUp() {
|
|
|
|
sranddev()
|
|
|
|
}
|
2015-10-17 00:03:18 +03:00
|
|
|
|
|
|
|
func testEqualityIsReflexive() {
|
|
|
|
property("equality is reflexive") <- forAll { (term: RangedTerm) in
|
|
|
|
Cofree.equals(annotation: ==, leaf: ==)(term.term, term.term)
|
|
|
|
}
|
|
|
|
}
|
2015-10-23 18:46:47 +03:00
|
|
|
|
|
|
|
func testEqualTermsZipCleanly() {
|
|
|
|
property("equal terms zip to a non-nil value") <- forAll { (term: RangedTerm) in
|
|
|
|
Cofree.zip(term.term, term.term) != nil
|
|
|
|
}
|
|
|
|
}
|
2015-10-16 23:56:30 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@testable import Doubt
|
|
|
|
import SwiftCheck
|
|
|
|
import XCTest
|