File tree 3 files changed +35
-16
lines changed
exercises/practice/gigasecond 3 files changed +35
-16
lines changed Original file line number Diff line number Diff line change 1
- # This is an auto-generated file. Regular comments will be removed when this
2
- # file is regenerated. Regenerating will not touch any manually added keys,
3
- # so comments can be added in a "comment" key.
1
+ # This is an auto-generated file.
2
+ #
3
+ # Regenerating this file via `configlet sync` will:
4
+ # - Recreate every `description` key/value pair
5
+ # - Recreate every `reimplements` key/value pair, where they exist in problem-specifications
6
+ # - Remove any `include = true` key/value pair (an omitted `include` key implies inclusion)
7
+ # - Preserve any other key/value pair
8
+ #
9
+ # As user-added comments (using the # character) will be removed when this file
10
+ # is regenerated, comments can be added via a `comment` key.
4
11
5
12
[92fbe71c-ea52-4fac-bd77-be38023cacf7 ]
6
13
description = " date only specification of time"
@@ -13,6 +20,11 @@ description = "third test for date only specification of time"
13
20
14
21
[c9d89a7d-06f8-4e28-a305-64f1b2abc693 ]
15
22
description = " full time specified"
23
+ include = false
16
24
17
25
[09d4e30e-728a-4b52-9005-be44a58d9eba ]
18
26
description = " full time with day roll-over"
27
+ include = false
28
+
29
+ [fcec307c-7529-49ab-b0fe-20309197618a ]
30
+ description = " does not mutate the input"
Original file line number Diff line number Diff line change 1
1
(ns gigasecond )
2
2
3
- (defn from [] ; ; <- arglist goes here
4
- ; ; your code goes here
5
- )
3
+ (defn from
4
+ " Determines the date one gigasecond after the given date"
5
+ [date]
6
+ ; ; function body
7
+ )
Original file line number Diff line number Diff line change 1
1
(ns gigasecond-test
2
- (:require [clojure.test :refer [deftest is]]
2
+ (:require [clojure.test :refer [deftest testing is]]
3
3
gigasecond))
4
4
5
- (deftest from-apr-25-2011
6
- (is (= [2043 1 1 ] (gigasecond/from 2011 4 25 ))))
5
+ (deftest from_test_1
6
+ (testing " date-only specification of time"
7
+ (is (= [2043 1 1 ] (gigasecond/from 2011 4 25 )))))
7
8
8
- (deftest from-jun-13-1977
9
- (is (= [2009 2 19 ] (gigasecond/from 1977 6 13 ))))
9
+ (deftest from_test_2
10
+ (testing " second test for date-only specification of time"
11
+ (is (= [2009 2 19 ] (gigasecond/from 1977 6 13 )))))
10
12
11
- (deftest from-jul-19-1959
12
- (is (= [1991 3 27 ] (gigasecond/from 1959 7 19 ))))
13
+ (deftest from_test_3
14
+ (testing " third test for date-only specification of time"
15
+ (is (= [1991 3 27 ] (gigasecond/from 1959 7 19 )))))
13
16
14
- ; ; customize this to test your birthday and find your gigasecond date:
15
- ; ; (deftest your-birthday
16
- ; ; (is (= [year2 month2 day2] (gigasecond/from year1 month1 day1))))
17
+ (deftest from_test_4
18
+ (testing " does not mutate the input"
19
+ (let [date [1959 7 19 ]
20
+ new-date (apply gigasecond/from date)]
21
+ (is (= [1959 7 19 ] date)))))
You can’t perform that action at this time.
0 commit comments