Skip to content

Commit 92e3532

Browse files
authored
cars-assemble: Add the ability to select which tests to run (#872)
1 parent 7730ac4 commit 92e3532

2 files changed

Lines changed: 17 additions & 13 deletions

File tree

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
(defproject cars-assemble "0.1.0-SNAPSHOT"
22
:description "cars-assemble exercise."
33
:url "https://github.com/exercism/clojure/tree/main/exercises/concept/cars-assemble"
4-
:dependencies [[org.clojure/clojure "1.12.0"]])
4+
:dependencies [[org.clojure/clojure "1.12.0"]]
5+
:test-selectors {:task-1 :task-1
6+
:task-2 :task-2
7+
:production-rate :production-rate
8+
:working-items :working-items})

exercises/concept/cars-assemble/test/cars_assemble_test.clj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,50 @@
66
[x y]
77
(= (float x) (float y)))
88

9-
(deftest ^{:task 1} production-rate-speed-0-test
9+
(deftest ^{:task 1 :task-1 true :production-rate true} production-rate-speed-0-test
1010
(testing "Production rate for speed 0"
1111
(is (float-equal? 0.0 (cars-assemble/production-rate 0)))))
1212

13-
(deftest ^{:task 1} production-rate-speed-1-test
13+
(deftest ^{:task 1 :task-1 true :production-rate true} production-rate-speed-1-test
1414
(testing "Production rate for speed 1"
1515
(is (float-equal? 221.0 (cars-assemble/production-rate 1)))))
1616

17-
(deftest ^{:task 1} production-rate-speed-4-test
17+
(deftest ^{:task 1 :task-1 true :production-rate true} production-rate-speed-4-test
1818
(testing "Production rate for speed 4"
1919
(is (float-equal? 884.0 (cars-assemble/production-rate 4)))))
2020

21-
(deftest ^{:task 1} production-rate-speed-7-test
21+
(deftest ^{:task 1 :task-1 true :production-rate true} production-rate-speed-7-test
2222
(testing "Production rate for speed 7"
2323
(is (float-equal? 1392.3 (cars-assemble/production-rate 7)))))
2424

25-
(deftest ^{:task 1} production-rate-speed-9-test
25+
(deftest ^{:task 1 :task-1 true :production-rate true} production-rate-speed-9-test
2626
(testing "Production rate for speed 9"
2727
(is (float-equal? 1591.2 (cars-assemble/production-rate 9)))))
2828

29-
(deftest ^{:task 1} production-rate-speed-10-test
29+
(deftest ^{:task 1 :task-1 true :production-rate true} production-rate-speed-10-test
3030
(testing "Production rate for speed 10"
3131
(is (float-equal? 1701.7 (cars-assemble/production-rate 10)))))
3232

33-
(deftest ^{:task 2} working-items-speed-0-test
33+
(deftest ^{:task 2 :task-2 true :working-items true} working-items-speed-0-test
3434
(testing "Working items for speed 0"
3535
(is (= 0 (cars-assemble/working-items 0)))))
3636

37-
(deftest ^{:task 2} working-items-speed-1-test
37+
(deftest ^{:task 2 :task-2 true :working-items true} working-items-speed-1-test
3838
(testing "Working items for speed 1"
3939
(is (= 3 (cars-assemble/working-items 1)))))
4040

41-
(deftest ^{:task 2} working-items-speed-5-test
41+
(deftest ^{:task 2 :task-2 true :working-items true} working-items-speed-5-test
4242
(testing "Working items for speed 5"
4343
(is (= 16 (cars-assemble/working-items 5)))))
4444

45-
(deftest ^{:task 2} working-items-speed-8-test
45+
(deftest ^{:task 2 :task-2 true :working-items true} working-items-speed-8-test
4646
(testing "Working items for speed 8"
4747
(is (= 26 (cars-assemble/working-items 8)))))
4848

49-
(deftest ^{:task 2} working-items-speed-9-test
49+
(deftest ^{:task 2 :task-2 true :working-items true} working-items-speed-9-test
5050
(testing "Working items for speed 9"
5151
(is (= 26 (cars-assemble/working-items 9)))))
5252

53-
(deftest ^{:task 2} working-items-speed-10-test
53+
(deftest ^{:task 2 :task-2 true :working-items true} working-items-speed-10-test
5454
(testing "Working items for speed 10"
5555
(is (= 28 (cars-assemble/working-items 10)))))

0 commit comments

Comments
 (0)