diff --git a/test/propeller/push/instructions/string_spec.clj b/test/propeller/push/instructions/string_spec.clj index 4349e8f..c32ae2c 100644 --- a/test/propeller/push/instructions/string_spec.clj +++ b/test/propeller/push/instructions/string_spec.clj @@ -193,4 +193,19 @@ (defspec from-float-spec 100 (prop/for-all [float gen/double] - (check-from-boolean float))) \ No newline at end of file + (check-from-float float))) + + +;; string/from-integer + +(defn check-from-integer + [value] + (let [start-state (state/push-to-stack state/empty-state :integer value) + end-state ((:string_from_integer @core/instruction-table) start-state) + expected-result (str value)] + (= expected-result + (state/peek-stack end-state :string)))) + +(defspec from-integer-spec 100 + (prop/for-all [int gen/small-integer] + (check-from-integer int))) \ No newline at end of file