proptest/
lib.rs

1//-
2// Copyright 2017, 2018 Jason Lingle
3//
4// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7// option. This file may not be copied, modified, or distributed
8// except according to those terms.
9
10//! # Proptest Reference Documentation
11//!
12//! This is the reference documentation for the proptest API.
13//!
14//! For documentation on how to get started with proptest and general usage
15//! advice, please refer to the [Proptest Book](https://proptest-rs.github.io/proptest/intro.html).
16
17#![forbid(future_incompatible)]
18#![deny(missing_docs, bare_trait_objects)]
19#![no_std]
20#![cfg_attr(clippy, allow(
21    doc_markdown,
22    // We have a lot of these lints for associated types... And we don't care.
23    type_complexity
24))]
25#![cfg_attr(
26    feature = "unstable",
27    feature(allocator_api, try_trait_v2, coroutine_trait, never_type)
28)]
29#![cfg_attr(all(feature = "std", feature = "unstable"), feature(ip))]
30#![cfg_attr(docsrs, feature(doc_cfg))]
31
32// std_facade is used in a few macros, so it needs to be public.
33#[macro_use]
34#[doc(hidden)]
35pub mod std_facade;
36
37#[cfg(any(feature = "std", test))]
38#[macro_use]
39extern crate std;
40
41#[cfg(all(feature = "alloc", not(feature = "std")))]
42#[macro_use]
43extern crate alloc;
44
45#[macro_use]
46mod product_tuple;
47
48#[macro_use]
49extern crate bitflags;
50#[cfg(feature = "bit-set")]
51extern crate bit_set;
52
53#[cfg(feature = "fork")]
54#[macro_use]
55extern crate rusty_fork;
56
57#[macro_use]
58mod macros;
59
60#[doc(hidden)]
61#[macro_use]
62pub mod sugar;
63
64pub mod arbitrary;
65pub mod array;
66pub mod bits;
67pub mod bool;
68pub mod char;
69pub mod collection;
70pub mod num;
71pub mod strategy;
72pub mod test_runner;
73pub mod tuple;
74
75pub mod option;
76#[cfg(feature = "std")]
77#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
78pub mod path;
79pub mod result;
80pub mod sample;
81#[cfg(feature = "std")]
82#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
83pub mod string;
84
85pub mod prelude;
86
87#[cfg(feature = "attr-macro")]
88pub use proptest_macro::property_test; 
89
90#[cfg(feature = "attr-macro")]
91#[test]
92fn compile_tests() {
93    let t = trybuild::TestCases::new();
94    t.pass("tests/pass/*.rs");
95}