diff --git a/test/propeller/push/instructions/string_spec.clj b/test/propeller/push/instructions/string_spec.clj index e9e0f6a..1f29a4f 100644 --- a/test/propeller/push/instructions/string_spec.clj +++ b/test/propeller/push/instructions/string_spec.clj @@ -148,4 +148,19 @@ (defspec first-spec 100 (prop/for-all [str gen/string] - (check-first str))) \ No newline at end of file + (check-first str))) + + +;; string/from-boolean + +(defn check-from-boolean + [value] + (let [start-state (state/push-to-stack state/empty-state :boolean value) + end-state ((:string_from_boolean @core/instruction-table) start-state) + expected-result (str value)] + (= expected-result + (state/peek-stack end-state :string)))) + +(defspec from-boolean-spec 10 + (prop/for-all [bool gen/boolean] + (check-from-boolean bool))) \ No newline at end of file