Module compiler

arbitrary

coil test uses this module to call functions that have contracts with generated inputs. Implement Arbitrary for your own types, or derive it with #[derive(Arbitrary)] on classes and enums. A Gen grows its size from 0, so the first failing input it finds is a small one.

Written in Coil and shipped inside the compiler.

Import what you use (use path::* is not allowed):

use arbitrary::{Gen, Arbitrary};

Types#

NameDescription
GenA seeded source of random values.

Traits#

NameDescription
ArbitraryA type coil test can make values of.

Functions#

NameDescription
anyA random T, chosen by the expected type: let x: Vec<int> = any(g);.
↑ ↓ navigate ↵ open