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.119 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.118 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.117 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.116 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.115 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.114 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.113 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.111 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.110 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.109 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.108 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.107 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.106 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.105 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.104 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.103 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.102 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.101 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.100 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe
trackler-2.2.1.99 tracks/lfe/exercises/gigasecond/test/gigasecond-tests.lfe