Responses for exercises in Exercism.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

26 lines
1018 B

(ns tracks-on-tracks-on-tracks-test
(:require [clojure.test :refer [deftest is]]
tracks-on-tracks-on-tracks))
(deftest list-empty-test
(is (= '() (tracks-on-tracks-on-tracks/new-list))))
(deftest list-add-test
(is (= '("JavaScript" "Java" "Lisp" "Clojure")
(->> (tracks-on-tracks-on-tracks/new-list)
(tracks-on-tracks-on-tracks/add-language "Clojure")
(tracks-on-tracks-on-tracks/add-language "Lisp")
(tracks-on-tracks-on-tracks/add-language "Java")
(tracks-on-tracks-on-tracks/add-language "JavaScript")))))
(deftest first-test
(is (= "Lisp" (tracks-on-tracks-on-tracks/first-language '("Lisp" "Clojure")))))
(deftest list-remove-test
(is (= '("Clojure") (tracks-on-tracks-on-tracks/remove-language '("Lisp" "Clojure")))))
(deftest list-count-test
(is (= 3 (tracks-on-tracks-on-tracks/count-languages '("JavaScript" "Java" "Clojure")))))
(deftest learning-list-test
(is (= 3 (tracks-on-tracks-on-tracks/learning-list))))