diff --git a/src/cal-day.scm b/src/cal-day.scm index c796114..120df80 100644 --- a/src/cal-day.scm +++ b/src/cal-day.scm @@ -118,6 +118,32 @@ (define (cal-day-tests!) (run-tests cal-day + (test-equal? make-cal-day + (make-cal-day 2023 5 10) + `(,TAG-CAL-DAY 2023 5 10)) + (test-true cal-year-leap? + (cal-year-leap? 2000)) + (test-true cal-year-leap? + (cal-year-leap? 2024)) + (test-false cal-year-leap? + (cal-year-leap? 2023)) + (test-false cal-year-leap? + (cal-year-leap? 1900)) + (test-eq? cal-month-days + (cal-month-days 2023 5) + 31) + (test-eq? cal-month-days + (cal-month-days 2023 2) + 28) + (test-eq? cal-month-days + (cal-month-days 2024 2) + 29) + (test-true cal-day? + (cal-day? (make-cal-day 2023 5 10))) + (test-false cal-day? + (cal-day? (make-cal-day 2023 2 29))) + (test-true cal-day? + (cal-day? (make-cal-day 2024 2 29))) )) )