Skip to content

Commit ee905fe

Browse files
committed
Add tests for NSURL conformance
1 parent 192788d commit ee905fe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Tests/SQLiteTests/FoundationTests.swift

+11
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,15 @@ class FoundationTests: XCTestCase {
2626
XCTAssertEqual(UUID(uuidString: "4ABE10C9-FF12-4CD4-90C1-4B429001BAD3"), uuid)
2727
}
2828

29+
func testURLFromString() {
30+
let string = "http://foo.com"
31+
let url = URL.fromDatatypeValue(string)
32+
XCTAssertEqual(URL(string: string), url)
33+
}
34+
35+
func testStringFromURL() {
36+
let url = URL(string: "http://foo.com")!
37+
let string = url.datatypeValue
38+
XCTAssertEqual("http://foo.com", string)
39+
}
2940
}

0 commit comments

Comments
 (0)