Skip to content

Commit

Permalink
FIX/test.el: fix benchmark test
Browse files Browse the repository at this point in the history
  • Loading branch information
guidoschmidt committed Dec 23, 2022
1 parent aee2296 commit a6c55e8
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions test.el
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,15 @@ B should be earlier than A



;; (ert-deftest test-circadian-setup-benchmark ()
;; "Benchmark (circadian-setup)."
;; :expected-result :failed
;; (setq calendar-latitude 49)
;; (setq calendar-longitude 5)
;; (setq circadian-themes '((:sunrise . wombat)
;; (:sunset . tango)))
;; (let ((elapsed (benchmark-elapse (circadian-setup))))
;; (should (equal t (< elapsed 0.01)))
;; (print (concat "(circadian-setup) took " (format "%.10f seconds" elapsed)))))
(ert-deftest test-circadian-setup-benchmark ()
"Benchmark (circadian-setup)."
(setq calendar-latitude 49)
(setq calendar-longitude 5)
(setq circadian-themes '((:sunrise . wombat)
(:sunset . tango)))
(let ((elapsed (benchmark-elapse (circadian-setup))))
(should (equal t (< elapsed 0.05)))
(print (concat "(circadian-setup) took " (format "%.10f seconds" elapsed)))))



Expand All @@ -159,7 +158,7 @@ https://github.com/guidoschmidt/circadian.el/issues/27"
test-circadian-sunrise-sunset
test-circadian-sunrise-sunset-timezones
test-circadian-time-comparisons
;; test-circadian-setup-benchmark
test-circadian-setup-benchmark
test-circadian-invalid-solar-sunrise-sunset))

(provide 'circadian.el-test)
Expand Down

0 comments on commit a6c55e8

Please sign in to comment.