Skip to content

Commit

Permalink
Tests for bindings issues identified in #181
Browse files Browse the repository at this point in the history
One of these was resolved by the upgrade to syntax-spec-v2. Tests for
the remaining issues are left commented out.
  • Loading branch information
countvajhula committed Sep 13, 2024
1 parent 29bb906 commit 44511b3
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions qi-test/tests/flow.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,32 @@
"Racket functions named `as` aren't clobbered")
(check-equal? ((☯ (~> (esc (lambda (v) (as v))))) 3)
3
"Racket functions named `as` aren't clobbered")))

"Racket functions named `as` aren't clobbered"))
(test-equal? "binding used in Racket expr position"
((☯ (~> (as p) (gen p))) 5)
5)
(test-equal? "binding used in Racket expr position"
((☯ (~> (as p) (gen p))) odd?)
odd?)
(test-equal? "binding a value used in a Racket expr position as a function"
((☯ (~>> (as p)
(range 10)
(filter p)))
odd?)
(list 1 3 5 7 9))
;; See issue #181
;; (test-equal? "binding a value used in a floe position"
;; ((☯ (~> (as p)
;; (range 10)
;; △
;; (pass p)
;; ▽))
;; odd?)
;; (list 1 3 5 7 9))
;; (test-exn "using a qi binding as a primitive flow"
;; exn:fail:contract:arity?
;; (thunk ((☯ (~> (as p) p)) odd?)))
)
(test-suite
"routing forms"
(test-suite
Expand Down

0 comments on commit 44511b3

Please sign in to comment.