Skip to content

Quickcheck and test coverage #31

Closed
@japaric

Description

@japaric

Quickcheck generates integer values in a small range around zero ([-100, 100]) (cf BurntSushi/quickcheck#119). These values are not enough to tests all the branches of some intrinsics implementation. We need better control over the generated values; here's are some possible solutions of the top of my head:

  • Synthesize integer values from two halves. That's is use (u32, u32) as quickcheck argument and then use u64::from_parts(some_u32, another_u32) in the actual test.
  • Create a newtype, e.g. U64(u64), and implement the Arbitrary trait for it, but have the implementation generate values in the [MIN, MAX] range.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions