Sha256: fe2ef855aefe0ed111fa581e35987488232344b8be075c8d7a9e63d16d3d5d5d

Contents?: true

Size: 643 Bytes

Versions: 395

Compression:

Stored size: 643 Bytes

Contents

;;; perfect-numbers-test.el --- Tests for perfect-numbers (exercism)

;;; Commentary:

;;; Code:

(load-file "perfect-numbers.el")


(ert-deftest no-perfect-numbers-in-1-to-5 ()
    (should (equal (perfect-numbers 5) '())))

(ert-deftest return-one-perfect-number-for-range-1-to-6 ()
    (should (equal (perfect-numbers 6) '(6))))

(ert-deftest return-3-perfect-numbers-for-range-1-to-1000 ()
    (should (equal (perfect-numbers 1000) '(6 28 496))))

(ert-deftest return-4-perfect-numbers-for-range-1-to-10000 ()
    (should (equal (perfect-numbers 10000) '(6 28 496 8128))))


(provide 'perfect-numbers)
;;; perfect-numbers-test.el ends here

Version data entries

395 entries across 395 versions & 1 rubygems

Version Path
trackler-2.2.1.98 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.97 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.96 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.95 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.94 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.93 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.92 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.91 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.90 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.89 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.88 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.87 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.86 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.85 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.84 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.83 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.82 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.81 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.80 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.79 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el