diff --git a/test/afilter-test.rkt b/test/afilter-test.rkt index 190c86b..ec698e5 100644 --- a/test/afilter-test.rkt +++ b/test/afilter-test.rkt @@ -15,7 +15,15 @@ (afilter ((* it it) . > . 50) lst) "Multiple 'it' in a nested expression.") +(define (f lst) + (afilter (= it 42) lst)) + (check-equal? '() - (afilter (= it 42) '()) + (f '()) "Empty list.") + +(check-exn + exn:fail? + (f '(1)) + "To get 100% code coverage for the f function.") diff --git a/test/amap-test.rkt b/test/amap-test.rkt index 3ca74f0..1b3a928 100644 --- a/test/amap-test.rkt +++ b/test/amap-test.rkt @@ -13,7 +13,15 @@ (amap (number->string (+ it it)) '(1 2)) "Multiple 'it' in a nested expression.") +(define (f lst) + (amap (/ it 0) lst)) + (check-equal? '() - (amap (/ it 0) '()) + (f '()) "Empty list.") + +(check-exn + exn:fail? + (f '(1)) + "To get 100% code coverage for the f function.")