Sha256: 97370700ad558a7b3a1fadf8fc28ca413cc8c39e1984aaadaffb11e7b683ff75

Contents?: true

Size: 1.17 KB

Versions: 31

Compression:

Stored size: 1.17 KB

Contents

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

;;; Commentary:

;;; Code:

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

(ert-deftest armstrong-number-5 ()
  "Single digit numbers are Armstrong numbers"
  (should (armstrong-p 5)))

(ert-deftest not-armstrong-number-10 ()
  "There are no 2 digit Armstrong numbers"
  (should (not (armstrong-p 10))))

(ert-deftest armstrong-number-153 ()
  "Three digit number that should an Armstrong number"
  (should (armstrong-p 153)))

(ert-deftest not-armstrong-number-100 ()
  "Three digit number that should an Armstrong number"
  (should (not (armstrong-p 100))))

(ert-deftest armstrong-number-9474 ()
  "Four digit number that should an Armstrong number"
  (should (armstrong-p 9474)))

(ert-deftest not-armstrong-number-9475 ()
  "Four digit number that should not an Armstrong number"
  (should (not (armstrong-p 9476))))

(ert-deftest armstrong-number-9926315 ()
  "Seven digit number that should an Armstrong number"
  (should (armstrong-p 9926315)))

(ert-deftest not-armstrong-number-9926314 ()
  "Seven digit number that should not an Armstrong number"
  (should (not (armstrong-p 9926314))))

;;; armstrong-numbers-test.el ends here

Version data entries

31 entries across 31 versions & 1 rubygems

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