-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fb0ce5
commit 8588d04
Showing
1 changed file
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
(ns gigasecond-test | ||
(:require [clojure.test :refer [deftest is]] | ||
(:require [clojure.test :refer [deftest testing is]] | ||
gigasecond)) | ||
|
||
(deftest from-apr-25-2011 | ||
(is (= [2043 1 1] (gigasecond/from 2011 4 25)))) | ||
(deftest test-92fbe71c-ea52-4fac-bd77-be38023cacf7 | ||
(testing "Date-only specification of time" | ||
(is (= [2043 1 1] (gigasecond/from 2011 4 25))))) | ||
|
||
(deftest from-jun-13-1977 | ||
(is (= [2009 2 19] (gigasecond/from 1977 6 13)))) | ||
(deftest test-6d86dd16-6f7a-47be-9e58-bb9fb2ae1433 | ||
(testing "Second test for date-only specification of time" | ||
(is (= [2009 2 19] (gigasecond/from 1977 6 13))))) | ||
|
||
(deftest from-jul-19-1959 | ||
(is (= [1991 3 27] (gigasecond/from 1959 7 19)))) | ||
(deftest test-77eb8502-2bca-4d92-89d9-7b39ace28dd5 | ||
(testing "Third test for date-only specification of time" | ||
(is (= [1991 3 27] (gigasecond/from 1959 7 19))))) | ||
|
||
;; customize this to test your birthday and find your gigasecond date: | ||
;; (deftest your-birthday | ||
;; (is (= [year2 month2 day2] (gigasecond/from year1 month1 day1)))) | ||
(deftest test-fcec307c-7529-49ab-b0fe-20309197618a | ||
(testing "Does not mutate the input" | ||
(let [date [1959 7 19] | ||
new-date (apply gigasecond/from date)] | ||
(is (= [1959 7 19] date))))) |