Skip to content

Commit

Permalink
Fix arity check test
Browse files Browse the repository at this point in the history
  • Loading branch information
ggeoffrey authored and dustingetz committed Feb 16, 2023
1 parent a4bd8b4 commit 2446937
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/hyperfiddle/electric.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ running on a remote host.

(cc/defn -check-fn-arity! [name expected actual]
(when (not= expected actual)
(throw (ex-info (str "You called " (or name (pr-str ::unnamed-pfn)) ", a " expected "-arg e/fn with " actual " arguments.")
(throw (ex-info (str "You called " (or name (pr-str ::unnamed-efn)) ", a " expected "-arg e/fn with " actual " arguments.")
{:name name}))))

;; TODO self-refer
Expand Down
4 changes: 2 additions & 2 deletions test/hyperfiddle/electric_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1783,12 +1783,12 @@
(catch ExceptionInfo e (tap e))
(catch Cancelled _)
(catch Throwable t (prn t))))
(ex-message %) := "You called :hyperfiddle.electric/unnamed-pfn, a 3-arg p/fn with 4 arguments.")
(ex-message %) := "You called :hyperfiddle.electric/unnamed-efn, a 3-arg e/fn with 4 arguments.")
(with (p/run (try (new (p/fn [x y] (throw (ex-info "nope" {}))) 100)
(catch ExceptionInfo e (tap e))
(catch Cancelled _)
(catch Throwable t (prn t))))
(ex-message %) := "You called :hyperfiddle.electric/unnamed-pfn, a 2-arg p/fn with 1 arguments."))
(ex-message %) := "You called :hyperfiddle.electric/unnamed-efn, a 2-arg e/fn with 1 arguments."))

(tests
"Partial application"
Expand Down

0 comments on commit 2446937

Please sign in to comment.