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.98 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.97 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.96 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.95 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.94 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.93 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.92 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.91 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.90 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.89 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.88 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.87 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.86 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.85 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.84 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.83 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.82 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.81 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.80 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj
trackler-2.2.1.79 tracks/clojure/exercises/perfect-numbers/test/perfect_numbers_test.clj