You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
586 B
24 lines
586 B
3 years ago
|
#lang racket
|
||
|
|
||
|
; Tests adapted from `problem-specifications/canonical-data.json v1.2.0
|
||
|
(require "two-fer.rkt")
|
||
|
|
||
|
(module+ test
|
||
|
(require rackunit rackunit/text-ui)
|
||
|
|
||
|
(define suite
|
||
|
(test-suite
|
||
|
"two fer tests"
|
||
|
|
||
|
(test-equal? "no name given"
|
||
|
(two-fer)
|
||
|
"One for you, one for me.")
|
||
|
(test-equal? "a name given"
|
||
|
(two-fer "Alice")
|
||
|
"One for Alice, one for me.")
|
||
|
(test-equal? "another name given"
|
||
|
(two-fer "Bob")
|
||
|
"One for Bob, one for me.")))
|
||
|
|
||
|
(run-tests suite))
|