Re: [?] Spec error: please tell me the reason.

2019-10-30 Thread Sean Corfield
With that correction, you should see: spec-test=> (transform-fontspecs test-sample) {"283f1EV" {:size 21, :family "c2S6", :color ""}, "BzYMt4eEm" {:size -5, :family "q0xhOE3", :color "bhV3PsVh"}, "uA2i" {:size -5, :family "HHGoD", :color "J47ZX935"}} spec-test=> On Wed, Oct 30, 2019 at 9:51 PM

Re: [?] Spec error: please tell me the reason.

2019-10-30 Thread Sean Corfield
(s/def ::fontspecs (s/coll-of ::fontspec)) Sorry, I missed that error first time around. s/* is a regex spec but your argument should be a collection of ::fontspec On Wed, Oct 30, 2019 at 9:02 PM Philos Kim wrote: > Thanks for your answer! > > I corrected the code like the following according

Re: [?] Spec error: please tell me the reason.

2019-10-30 Thread Philos Kim
Thanks for your answer! I corrected the code like the following according to your advice. (s/fdef transform-fontspecs :args (s/cat :fontspecs ::fontspecs)) However, the same error occurs again. 2019년 10월 31일 목요일 오전 11시 44분 46초 UTC+9, Philos Kim 님의 말: > > I don't know why the following spec

Re: [?] Spec error: please tell me the reason.

2019-10-30 Thread Sean Corfield
s/fdef's :args should be a sequence of the arguments to the function. In this case it should be :args (s/cat :fontspecs ::fontspecs) which indicates it is a sequence with one element, named :fontspecs, whose spec is ::fontspecs On Wed, Oct 30, 2019 at 7:45 PM Philos Kim wrote: > I don't know

[?] Spec error: please tell me the reason.

2019-10-30 Thread Philos Kim
I don't know why the following spec error occurred. Could anyone tell me why? (ns spec-test (:require [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as stest])) ;;; spec definitions (s/def :msds.fontspec/tag #{:fontspec}) (s/def ::id string?) (s/def ::size int?) (s/def