Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Tests/FoundationEssentialsTests/DateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,24 @@ final class DateTests : XCTestCase {
XCTAssertEqual("1970-01-01 00:00:00 +0000", date.description)
}

func testDescriptionDistantPast() {
func testDescriptionDistantPast() throws {
#if os(Windows)
throw XCTSkip("ucrt does not support distant past")
#else
#if FOUNDATION_FRAMEWORK
XCTAssertEqual("0001-01-01 00:00:00 +0000", Date.distantPast.description)
#else
XCTAssertEqual("0000-12-30 00:00:00 +0000", Date.distantPast.description)
#endif
#endif
}

func testDescriptionDistantFuture() {
func testDescriptionDistantFuture() throws {
#if os(Windows)
throw XCTSkip("ucrt does not support distant future")
#else
XCTAssertEqual("4001-01-01 00:00:00 +0000", Date.distantFuture.description)
#endif
}

func testDescriptionBeyondDistantPast() {
Expand Down