os-time-check.scm 688 B

12345678910111213141516171819202122
  1. ; Part of Scheme 48 1.9. See file COPYING for notices and license.
  2. ; Authors: Michael Zabka
  3. ; ,config ,load scheme/big/os-time-check.scm
  4. ; (define-test-suite all-tests (os-time-tests))
  5. ; (run-test-suite all-tests)
  6. (define-test-suite os-time-tests)
  7. (define-test-case time/1 os-time-tests
  8. (let ((current-time (current-utc-time)))
  9. (check (and (time? current-time)
  10. (number? (time-seconds current-time))
  11. (number? (time-microseconds current-time))
  12. (<= 0 (time-microseconds current-time) (expt 10 6))))))
  13. (define-test-case timezone-offset os-time-tests
  14. (let ((current-offset (timezone-offset)))
  15. (check (and (number? current-offset)
  16. (<= -43200 current-offset 50400)))))