Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion exercises/concept/cars-assemble/project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
(defproject cars-assemble "0.1.0-SNAPSHOT"
:description "cars-assemble exercise."
:url "https://github.com/exercism/clojure/tree/main/exercises/concept/cars-assemble"
:dependencies [[org.clojure/clojure "1.12.0"]])
:dependencies [[org.clojure/clojure "1.12.0"]]
:test-selectors {:task-1 :task-1
:task-2 :task-2
:production-rate :production-rate
:working-items :working-items})
24 changes: 12 additions & 12 deletions exercises/concept/cars-assemble/test/cars_assemble_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,50 +6,50 @@
[x y]
(= (float x) (float y)))

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

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

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

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

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

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

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

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

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

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

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

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