tbaranes / SwiftyUtils

All the reusable code that we need in each project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DateCalendarExtensionsTests Fail

Sweeper777 opened this issue · comments

When I run the tests in DateCalendarExtensionsTests.swift, all the tests passed except this:

func testMonthAndWeekday() {
    XCTAssertEqual(Date.november.with(year: 1968).first.saturday, Date.date(1968, 11, 2)) // fails
    XCTAssertEqual(Date.january.with(year: 1995).second.saturday, Date.date(1995, 1, 14))
    XCTAssertEqual(Date.january.with(year: 1992).second.friday, Date.date(1992, 1, 10))
    XCTAssertEqual(Date.july.with(year: 2013).fourth.wednesday, Date.date(2013, 7, 24))
    XCTAssertEqual(Date.december.with(year: 2014).fourth.thursday, Date.date(2014, 12, 25))
    XCTAssertEqual(Date.may.with(year: 2016).fifth.monday, Date.date(2016, 5, 30))
    XCTAssertEqual(Date.march.with(year: 2015).last.tuesday, Date.date(2015, 3, 31))
    XCTAssertEqual(Date.december.with(year: 1995).fifth.saturday, Date.date(1995, 12, 30))
    XCTAssertEqual(Date.december.with(year: 1995).fifth.sunday, Date.date(1995, 12, 31))
    XCTAssertNil(Date.february.with(year: 2013).fifth.sunday) // fails
    XCTAssertNil(Date.february.with(year: 1995).fifth.tuesday)
    XCTAssertNil(Date.february.with(year: 1995).fifth.thursday) // fails
}

You can pull or rebase against master, I check it yesterday and remove them since they doesn't seems useful. You shouldn't have this issue again