Sha256: ddb5b6b7c61c2bfba9452560b908dfc94a3ccb74823910851368a1972949b904

Contents?: true

Size: 665 Bytes

Versions: 289

Compression:

Stored size: 665 Bytes

Contents

(ns nth-prime-test
  (:require [clojure.test :refer [deftest testing is]]
            nth-prime))

(deftest first-prime
  (testing "the first prime is 2"
    (is (= 2 (nth-prime/nth-prime 1)))))

(deftest second-prime
  (testing "the second prime is 3"
    (is (= 3 (nth-prime/nth-prime 2)))))

(deftest sixth-prime
  (testing "the sixth prime is 13"
    (is (= 13 (nth-prime/nth-prime 6)))))

(deftest ten-thousand-first-prime
  (testing "the ten thousand and first prime is 104743"
    (is (= 104743 (nth-prime/nth-prime 10001)))))

(deftest zeroth-prime
  (testing "there is no zeroth prime"
    (is (thrown? IllegalArgumentException (nth-prime/nth-prime 0)))))

Version data entries

289 entries across 289 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.179 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.178 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.177 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.176 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.175 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.174 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.173 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.172 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.171 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.170 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.169 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.167 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.166 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.165 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.164 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.163 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.162 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.161 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.160 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj