Sha256: f787d13dcb1f47b34b4ca7bc20edfcd3454768fa0201811d990d520a5d35d8dd

Contents?: true

Size: 969 Bytes

Versions: 343

Compression:

Stored size: 969 Bytes

Contents

(ql:quickload "lisp-unit")
#-xlisp-test (load "gigasecond")

(defpackage #:gigasecond-test
  (:use #:cl #:lisp-unit))

(in-package #:gigasecond-test)

(define-test from-lisp-epoch
  (assert-equal '(1931 9 10 1 46 40) (gigasecond:from 1900 1 1 0 0 0)))

(define-test from-unix-epoch
  (assert-equal '(2001 9 9 1 46 40) (gigasecond:from 1970 1 1 0 0 0)))

(define-test from-20110425T120000Z
  (assert-equal '(2043 1 1 13 46 40) (gigasecond:from 2011 4 25 12 0 0)))

(define-test from-19770613T235959Z
  (assert-equal '(2009 2 20 1 46 39) (gigasecond:from 1977 6 13 23 59 59)))

(define-test from-19590719T123030Z
  (assert-equal '(1991 3 27 14 17 10) (gigasecond:from 1959 7 19 12 30 30)))

; customize this to test your birthday and find your gigasecond date:
; (define-test your-birthday
;   (assert-equal '(year2 month2 day2) (gigasecond:from year1 month1 day1)))

#-xlisp-test
(let ((*print-errors* t)
      (*print-failures* t))
  (run-tests :all :gigasecond-test))

Version data entries

343 entries across 343 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.179 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.178 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.177 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.176 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.175 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.174 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.173 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.172 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.171 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.170 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.169 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.167 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.166 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.165 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.164 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.163 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.162 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.161 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp
trackler-2.2.1.160 tracks/common-lisp/exercises/gigasecond/gigasecond-test.lisp