Skip to content

Commit

Permalink
implement tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tasxatzial committed Nov 2, 2024
1 parent 3fb0ce5 commit 8588d04
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions exercises/practice/gigasecond/test/gigasecond_test.clj
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)))))

0 comments on commit 8588d04

Please sign in to comment.