Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects versions: Release 1.9
    • Fix versions: Release 1.11
    • Labels:
    • Approval:
      Vetted

      Description

      Add bigint? and spec.gen support.

      This part is easy:

      (defn bigint?
        "Returns true if n is a BigInt"
        {:added "1.9"}
        [n] (instance? clojure.lang.BigInt n))
      

      The generator is the tricky bit. test.check doesn't have a generator for bigints, just large-integer for things in long range. I think we'd want numbers beyond long range in a bigint generator (as that's a likely place where bugs might lie). Making a really high-quality bigint generator (with good growth and shrinking characteristics) is something that needs more thought.

      http://clojure.github.io/test.check/clojure.test.check.generators.html#var-large-integer

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              alexmiller Alex Miller
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: