diff --git a/test/propeller/push/instructions/string_spec.clj b/test/propeller/push/instructions/string_spec.clj index 50ea2de..18af4b2 100644 --- a/test/propeller/push/instructions/string_spec.clj +++ b/test/propeller/push/instructions/string_spec.clj @@ -113,4 +113,19 @@ (defspec drop-spec 100 (prop/for-all [str gen/string int gen/small-integer] - (check-drop str int))) \ No newline at end of file + (check-drop str int))) + + +;; string/empty-string + +(defn check-empty-string + [value] + (let [start-state (state/push-to-stack state/empty-state :string value) + end-state ((:string_empty_string @core/instruction-table) start-state) + expected-result (empty? value)] + (= expected-result + (state/peek-stack end-state :boolean)))) + +(defspec empty-string-spec 100 + (prop/for-all [str gen/string] + (check-empty-string str))) \ No newline at end of file