]> code.delx.au - gnu-emacs-elpa/blob - packages/test-simple/test/test-fns.el
Add 'packages/realgud/' from commit 'd811316e6a0f4eeee8a1347f504c196c86baa2cb'
[gnu-emacs-elpa] / packages / test-simple / test / test-fns.el
1 (require 'cl)
2 (load-file "../test-simple.el")
3 (test-simple-clear)
4
5 (setq test-info (make-test-info))
6 (test-simple-clear test-info)
7
8 (note "Initializing test information")
9 (assert-equal 0 (test-info-assert-count test-info) "Count zeroed")
10 (assert-equal 0 (test-info-failure-count test-info) "Failure zeroed")
11
12 (note "Summary information")
13 (assert-matches "0 failures in 0 assertions" (test-simple-summary-line test-info)
14 "initial summary")
15 (incf (test-info-assert-count test-info))
16 (incf (test-info-failure-count test-info))
17 (assert-matches "1 failure in 1 assertion" (test-simple-summary-line test-info)
18 "handling singular correctly")
19 (incf (test-info-assert-count test-info))
20 (assert-matches "1 failure in 2 assertions" (test-simple-summary-line test-info)
21 "back to plural for two assertions")
22
23 (end-tests)