Get 100% code coverage for the amap and afilter tests
This commit is contained in:
parent
0562921c67
commit
81c21f81d8
|
@ -15,7 +15,15 @@
|
||||||
(afilter ((* it it) . > . 50) lst)
|
(afilter ((* it it) . > . 50) lst)
|
||||||
"Multiple 'it' in a nested expression.")
|
"Multiple 'it' in a nested expression.")
|
||||||
|
|
||||||
|
(define (f lst)
|
||||||
|
(afilter (= it 42) lst))
|
||||||
|
|
||||||
(check-equal?
|
(check-equal?
|
||||||
'()
|
'()
|
||||||
(afilter (= it 42) '())
|
(f '())
|
||||||
"Empty list.")
|
"Empty list.")
|
||||||
|
|
||||||
|
(check-exn
|
||||||
|
exn:fail?
|
||||||
|
(f '(1))
|
||||||
|
"To get 100% code coverage for the f function.")
|
||||||
|
|
|
@ -13,7 +13,15 @@
|
||||||
(amap (number->string (+ it it)) '(1 2))
|
(amap (number->string (+ it it)) '(1 2))
|
||||||
"Multiple 'it' in a nested expression.")
|
"Multiple 'it' in a nested expression.")
|
||||||
|
|
||||||
|
(define (f lst)
|
||||||
|
(amap (/ it 0) lst))
|
||||||
|
|
||||||
(check-equal?
|
(check-equal?
|
||||||
'()
|
'()
|
||||||
(amap (/ it 0) '())
|
(f '())
|
||||||
"Empty list.")
|
"Empty list.")
|
||||||
|
|
||||||
|
(check-exn
|
||||||
|
exn:fail?
|
||||||
|
(f '(1))
|
||||||
|
"To get 100% code coverage for the f function.")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user