use `test-begin' in test
original commit: d678e7657deee54921e332157367979b90e36971
This commit is contained in:
parent
11ae3af9b3
commit
41634b8e34
|
@ -1,7 +1,6 @@
|
|||
#lang typed/scheme
|
||||
#lang typed/scheme/base
|
||||
|
||||
(require typed/racunit)
|
||||
|
||||
(: my-+ : Integer Integer -> Integer)
|
||||
(define (my-+ a b)
|
||||
(if (zero? a)
|
||||
|
@ -10,9 +9,10 @@
|
|||
|
||||
(: my-* : Integer Integer -> Integer)
|
||||
(define (my-* a b)
|
||||
(if (= a 1)
|
||||
(if (= 1 a)
|
||||
b
|
||||
(my-* (sub1 a) (my-+ b b))))
|
||||
|
||||
(check-equal? (my-+ 1 1) 2 "Simple addition")
|
||||
(check-equal? (my-* 1 2) 2 "Simple multiplication")
|
||||
(test-begin
|
||||
(check-equal? (my-+ 1 1) 2 "Simple addition")
|
||||
(check-equal? (my-* 2 2) 4 "Simple multiplication"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user