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.119 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.118 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.117 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.116 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.115 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.114 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.113 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.111 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.110 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.109 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.108 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.107 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.106 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.105 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.104 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.103 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.102 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.101 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.100 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj
trackler-2.2.1.99 tracks/clojure/exercises/nth-prime/test/nth_prime_test.clj