Add elisp/leap

This commit is contained in:
dwrz
2019-02-06 09:36:56 +00:00
parent bd7d8a2ccb
commit 0b299c6d20
3 changed files with 73 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
;;; leap-test.el --- Tests for Leap exercise (exercism)
;;; Commentary:
;;; Code:
(load-file "leap.el")
(ert-deftest vanilla-leap-year ()
(should (leap-year-p 1996)))
(ert-deftest any-old-year ()
(should-not (leap-year-p 1997)))
(ert-deftest non-leap-even-year ()
(should-not (leap-year-p 1997)))
(ert-deftest century ()
(should-not (leap-year-p 1900)))
(ert-deftest exceptional-century ()
(should (leap-year-p 2000)))
(provide 'leap-test)
;;; leap-test.el ends here