Sha256: 96711da6aa90d764e05201ea6ebf922de7288b83c3ce42942d893589a8dd2a59

Contents?: true

Size: 1.39 KB

Versions: 325

Compression:

Stored size: 1.39 KB

Contents

import XCTest
@testable import Gigasecond

class GigasecondTests: XCTestCase {

    func test1 () {
        let gs = Gigasecond(from: "2011-04-25T00:00:00")?.description
        XCTAssertEqual("2043-01-01T01:46:40", gs)
    }

    func test2 () {
        let gs = Gigasecond(from: "1977-06-13T00:00:00")?.description
        XCTAssertEqual("2009-02-19T01:46:40", gs)
    }

    func test3 () {
        let gs = Gigasecond(from: "1959-07-19T00:00:00")?.description
        XCTAssertEqual("1991-03-27T01:46:40", gs)
    }

    func testTimeWithSeconds () {
        let gs = Gigasecond(from: "1959-07-19T23:59:59")?.description
        XCTAssertEqual("1991-03-28T01:46:39", gs)
    }

    func testFullTimeSpecified () {
        let gs = Gigasecond(from: "2015-01-24T22:00:00")?.description
        XCTAssertEqual("2046-10-02T23:46:40", gs)
    }

    func testFullTimeWithDayRollOver () {
        let gs = Gigasecond(from: "2015-01-24T23:59:59")?.description
        XCTAssertEqual("2046-10-03T01:46:39", gs)
    }

    static var allTests: [(String, (GigasecondTests) -> () throws -> Void)] {
        return [
            ("test1 ", test1 ),
            ("test2 ", test2 ),
            ("test3 ", test3 ),
            ("testTimeWithSeconds ", testTimeWithSeconds ),
            ("testFullTimeSpecified ", testFullTimeSpecified ),
            ("testFullTimeWithDayRollOver ", testFullTimeWithDayRollOver ),
        ]
    }
}

Version data entries

325 entries across 325 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.97 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.96 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.95 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.94 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.93 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.92 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.91 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.90 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.89 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.88 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.87 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.86 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.85 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.84 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.83 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.82 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.81 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.80 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.79 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift