Sha256: 969dd62060519a09deafb998d1dffe9d693f0b9a72ec67a412ac7ee6f81ae0a5

Contents?: true

Size: 749 Bytes

Versions: 396

Compression:

Stored size: 749 Bytes

Contents

(defmodule gigasecond-tests
  (behaviour ltest-unit)
  (export all))

(include-lib "ltest/include/ltest-macros.lfe")

(deftest one
  (is-equal #(#(2043 1 1) #(1 46 40)) (gigasecond:from #(2011 4 25))))

(deftest two
  (is-equal #(#(2009 2 19) #(1 46 40)) (gigasecond:from #(1977 6 13))))

(deftest three
  (is-equal #(#(1991 3 27) #(1 46 40)) (gigasecond:from #(1959 7 19))))

(deftest four-with-seconds
  (is-equal
    #(#(1991 3 28) #(1 46 39))
    (gigasecond:from #(#(1959 7 19) #(23 59 59)))))

;; modify the test to test your 1 Gs anniversary
;; (deftest with-your-birthday
;;   (let ((your-birthday  #(year month day))
;;         (gs-anniversary (gigasecond:from your-birthday)))
;;     (is-equal #(#(2009 1 31) #(1 46 39)) gs-anniversary)))

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.158 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.157 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.156 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.155 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.154 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.153 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.152 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.151 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.150 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.149 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.148 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.147 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.146 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.145 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.144 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.143 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.142 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.141 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.140 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe