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