Sha256: 5b7af9b0baa626b4bad9f3d1ae081df3422639710b4caa2fdca53683069b3f2a

Contents?: true

Size: 1.07 KB

Versions: 130

Compression:

Stored size: 1.07 KB

Contents

#lang racket

(module+ test
  (require rackunit rackunit/text-ui)
  (require racket/date)
  (require "meetup.rkt")

  (define (make-date year month day)
    (seconds->date (find-seconds 0 0 0 day month year #f) #f))

  (define suite
    (test-suite
     "Tests for the meetup exercise"

     (check-equal? (meetup-day 2013 5 'Monday 'teenth)
                   (make-date 2013 5 13))

     (check-equal? (meetup-day 2013 2 'Saturday 'teenth)
                   (make-date 2013 2 16))

     (check-equal? (meetup-day 2013 5 'Tuesday 'first)
                   (make-date 2013 5 7))

     (check-equal? (meetup-day 2013 4 'Monday 'second)
                   (make-date 2013 4 8))

     (check-equal? (meetup-day 2013 9 'Thursday 'third)
                   (make-date 2013 9 19))

     (check-equal? (meetup-day 2013 3 'Sunday 'fourth)
                   (make-date 2013 3 24))

     (check-equal? (meetup-day 2013 10 'Thursday 'last)
                   (make-date 2013 10 31))

     (check-equal? (meetup-day 2012 2 'Wednesday 'last)
                   (make-date 2012 2 29))))

  (run-tests suite))

Version data entries

130 entries across 130 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.179 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.178 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.177 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.176 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.175 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.174 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.173 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.172 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.171 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.170 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.169 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.167 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.166 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.165 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.164 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.163 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.162 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.161 tracks/racket/exercises/meetup/meetup-test.rkt
trackler-2.2.1.160 tracks/racket/exercises/meetup/meetup-test.rkt