commit 3e460034ed51296a0697a57885bf879837d7b95a parent 7465aead4c5f5efe0562f2022da12cf6223f7c4c Author: Georges Dupéron <georges.duperon@gmail.com> Date: Thu, 29 Sep 2016 17:59:31 +0200 Added test Diffstat:
| M | test/test-split-xlist-ann.rkt | | | 17 | ++++++++++++++--- |
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/test/test-split-xlist-ann.rkt b/test/test-split-xlist-ann.rkt @@ -5,7 +5,6 @@ type-expander "../split-xlist.rkt") - (check-equal?: (((inst f-split-list Number (Listof Symbol)) (make-predicate (Listof Symbol))) (ann '(1 2 3 a b) @@ -129,4 +128,16 @@ (List* Number Number Number (U Null (List Number) (List Number Number)))) - '(() (7 8 9) (d e f g) (1 2 3 4))) -\ No newline at end of file + '(() (7 8 9) (d e f g) (1 2 3 4))) + +(check-equal?: (match (ann (list 1 "flob") Any) + [(and (? (make-predicate (xlist Fixnum String))) + (split-xlist whole Fixnum String)) whole]) + : (List Fixnum String Null) + '(1 "flob" ())) + +(check-equal?: (match (ann (list 1 "flob") Any) + [(and (? (make-predicate (xlist Fixnum String))) + (split-xlist whole Fixnum String)) whole]) + : (List One String Null) + '(1 "flob" ())) +\ No newline at end of file