kzccm1d4if10m2xaz1wqy3xar821pp1r-my-site-anaphoric-git.test.suzanne.soy-0.0.1

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 81c21f81d8239e63560fecacc5a1bdd8abbee249
parent 0562921c6752ae78c61bf64135d6fd86495b054d
Author: Suzanne Soy <jsmaniac.github@suzanne.soy>
Date:   Wed, 28 Jul 2021 20:06:28 +0100

Get 100% code coverage for the amap and afilter tests

Diffstat:
Mtest/afilter-test.rkt | 10+++++++++-
Mtest/amap-test.rkt | 10+++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)

diff --git 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 @@ -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.")