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