Sha256: 9466d22473fc40dd11a79cfe981073bcf4c6abcf3eed26727347b2e029ec86b4

Contents?: true

Size: 650 Bytes

Versions: 393

Compression:

Stored size: 650 Bytes

Contents

(ns perfect-numbers-test
  (:require
    [clojure.test :refer [deftest testing is]]
    [perfect-numbers]))

(deftest test-initialize-perfect-number
  (testing "Negative numbers throw an exception"
    (is (thrown? IllegalArgumentException (perfect-numbers/classify -1)))))

(deftest test-classify-deficient
  (testing "13 is a deficient number"
    (is (= :deficient (perfect-numbers/classify 13)))))

(deftest test-classify-perfect
  (testing "28 is a perfect number"
    (is (= :perfect (perfect-numbers/classify 28)))))

(deftest test-classify-abundant
  (testing "12 is an abundant number"
    (is (= :abundant (perfect-numbers/classify 12)))))

Version data entries

393 entries across 393 versions & 1 rubygems

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