diff --git a/test/propeller/push/instructions/string_spec.clj b/test/propeller/push/instructions/string_spec.clj index dd4c803..8b4dc61 100644 --- a/test/propeller/push/instructions/string_spec.clj +++ b/test/propeller/push/instructions/string_spec.clj @@ -40,4 +40,22 @@ (defspec concat-spec 100 (prop/for-all [s1 gen/string s2 gen/string] - (check-concat s1 s2))) \ No newline at end of file + (check-concat s1 s2))) + + +;; string/conj-char + +(defn check-conj-char + [value char] + (let [start-state (-> state/empty-state + (state/push-to-stack :string value) + (state/push-to-stack :char char)) + end-state ((:string_concat @core/instruction-table) start-state) + expected-result (str value char)] + (= expected-result + (state/peek-stack end-state :string)))) + +(defspec conj-char-spec 100 + (prop/for-all [str gen/string + char gen/char] + (check-concat str char))) \ No newline at end of file