From 61a1a1fbc6b731b64af5514ccb448a745f5cf2e2 Mon Sep 17 00:00:00 2001 From: AlexKnauth Date: Sun, 23 Aug 2015 09:26:10 -0400 Subject: [PATCH] add test for mixed by-position and keyword arguments --- unstable/lens/struct-join.rkt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/unstable/lens/struct-join.rkt b/unstable/lens/struct-join.rkt index d0a387f..114e75d 100644 --- a/unstable/lens/struct-join.rkt +++ b/unstable/lens/struct-join.rkt @@ -68,7 +68,12 @@ module+ test #:c (hash-ref-lens 'c) #:a (hash-ref-lens 'a) #:b (hash-ref-lens 'b))) - (test-multi* ([foo-hash-lens #:in [foo-hash-lens1 foo-hash-lens2 foo-hash-lens3]]) + (define foo-hash-lens4 + (lens-join/struct foo + (hash-ref-lens 'a) + #:c (hash-ref-lens 'c) + #:b (hash-ref-lens 'b))) + (test-multi* ([foo-hash-lens #:in [foo-hash-lens1 foo-hash-lens2 foo-hash-lens3 foo-hash-lens4]]) (check-equal? (lens-view foo-hash-lens (hash 'a 1 'b 2 'c 3)) (foo 1 2 3)) (check-equal? (lens-set foo-hash-lens (hash 'a 1 'b 2 'c 3) (foo 10 20 30))