Some tests wouldn't compile. I have no idea why

This commit is contained in:
Caleb Kleveter 2019-03-27 11:59:24 -05:00
parent f19f88f3bd
commit 19338ca889
No known key found for this signature in database
GPG Key ID: B38DBD5CF2C98D69
3 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@ import XCTest
final class FailableTests: XCTestCase {
func testInit()throws {
var story: Failable<String, USPhoneNumber> = try "Hello world...".failable()
var story: Failable<String, EmptyValidation<String>> = try "Hello world...".failable()
XCTAssertEqual(story.value, "Hello world...")
story = try "Long long ago...".failable()
@ -11,7 +11,7 @@ final class FailableTests: XCTestCase {
}
func testSet()throws {
var story: Failable<String, USPhoneNumber> = try "Hello world...".failable()
var story: Failable<String, EmptyValidation<String>> = try "Hello world...".failable()
try story <~ "Long long ago..."
XCTAssertEqual(story.value, "Long long ago...")

View File

@ -22,7 +22,7 @@ internal struct LessThan: InRangeValidation {
final class ComparableTests: XCTestCase {
func testNumberThousand()throws {
var int = try Failable<Int, NumberThousand>(5_000)
var int = Failable<Int, NumberThousand>(5_000)
try int <~ 9_999
try int <~ 1_000
@ -32,7 +32,7 @@ final class ComparableTests: XCTestCase {
}
func testGreaterThan()throws {
var int = try Failable<Int, GreaterThan>(5_000)
var int = Failable<Int, GreaterThan>(5_000)
try int <~ 1_000
try int <~ 10_000
@ -44,7 +44,7 @@ final class ComparableTests: XCTestCase {
}
func testLessThan()throws {
var int = try Failable<Int, LessThan>(5_000)
var int = Failable<Int, LessThan>(5_000)
try int <~ 9_999
try int <~ 999

View File

@ -5,7 +5,7 @@ typealias OptionalStringLength = NotNilValidate<LengthRange10To1028<String>>
final class OptionalTests: XCTestCase {
func testNotNil()throws {
var optional = try Failable<Bool?, NotNil<Bool>>(false)
var optional = try Failable<Bool?, NotNil<Bool>>.init(false)
try optional <~ true
try optional <~ false
@ -14,7 +14,7 @@ final class OptionalTests: XCTestCase {
}
func testNotNilValidate()throws {
var optional = try Failable<String?, OptionalStringLength>("Hello World")
var optional = try Failable<String?, OptionalStringLength>.init("Hello World")
try optional <~ "Long long ago"
try optional <~ String(repeating: "x", count: 10)