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.180 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.179 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.178 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.177 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.176 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.175 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.174 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.173 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.172 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.171 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.170 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.169 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.167 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.166 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.165 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.164 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.163 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.162 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.161 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift
trackler-2.2.1.160 tracks/swift/exercises/gigasecond/Tests/GigasecondTests/GigasecondTests.swift