exercism

Exercism solutions.
git clone git://code.dwrz.net/exercism
Log | Files | Refs

grains-test.el (709B)


      1 ;;; grains-test.el --- Test for Grains (exercism)
      2 
      3 ;;; Commentary:
      4 
      5 ;;; Code:
      6 
      7 (load-file "grains.el")
      8 
      9 (ert-deftest square-1 ()
     10   (should (= 1 (square 1))))
     11 
     12 (ert-deftest square-2 ()
     13   (should (= 2 (square 2))))
     14 
     15 (ert-deftest square-3 ()
     16   (should (= 4 (square 3))))
     17 
     18 (ert-deftest square-4 ()
     19   (should (= 8 (square 4))))
     20 
     21 (ert-deftest square-16 ()
     22   (should (= 32768
     23              (square 16))))
     24 
     25 (ert-deftest square-32 ()
     26   (should (= 2147483648
     27              (square 32))))
     28 
     29 (ert-deftest square-64 ()
     30   (should (= 9223372036854775808
     31              (square 64))))
     32 
     33 (ert-deftest total-grains ()
     34   (should (= 18446744073709551615
     35              (total))))
     36 
     37 (provide 'grains-test.el)
     38 ;;; grains-test.el ends here.