Skip to content

Commit

Permalink
test a few cases that weren't covered
Browse files Browse the repository at this point in the history
  • Loading branch information
countvajhula committed Jan 1, 2025
1 parent db7fe61 commit 6797eb3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions qi-test/tests/list.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
(test-suite
"qi/list tests"

(test-suite
"syntax"
(check-exn exn:fail?
(thunk (convert-compile-time-error
(☯ (filter odd? (list 1 2 3)))))
"more arguments are provided than indicated in the spec")
(check-exn exn:fail?
(thunk (convert-compile-time-error
(☯ filter)))
"form is used as an identifier but the spec indicates expected arguments"))

(test-suite
"basic"

Expand Down Expand Up @@ -272,6 +283,18 @@
((☯ (~> (range 10)
car)))
0)
(test-equal? "range..cadr"
((☯ (~> (range 10)
cadr)))
1)
(test-equal? "range..caddr"
((☯ (~> (range 10)
caddr)))
2)
(test-equal? "range..cadddr"
((☯ (~> (range 10)
cadddr)))
3)
(test-equal? "range..map"
((☯ (~> (range 3)
(map sqr))))
Expand Down

0 comments on commit 6797eb3

Please sign in to comment.