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.180 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.179 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.178 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.177 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.176 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.175 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.174 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.173 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.172 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.171 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.170 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.169 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.167 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.166 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.165 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.164 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.163 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.162 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.161 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el
trackler-2.2.1.160 tracks/elisp/exercises/perfect-numbers/perfect-numbers-test.el