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#[cfg(feature = "frunk")]
46#[macro_use]
47extern crate frunk_core;
48
49#[cfg(feature = "frunk")]
50#[macro_use]
51mod product_frunk;
52
53#[cfg(not(feature = "frunk"))]
54#[macro_use]
55mod product_tuple;
56
57#[macro_use]
58extern crate bitflags;
59#[cfg(feature = "bit-set")]
60extern crate bit_set;
61
62#[cfg(feature = "std")]
63#[macro_use]
64extern crate lazy_static;
65
66#[cfg(feature = "fork")]
67#[macro_use]
68extern crate rusty_fork;
69
70#[macro_use]
71mod macros;
72
73#[doc(hidden)]
74#[macro_use]
75pub mod sugar;
76
77pub mod arbitrary;
78pub mod array;
79pub mod bits;
80pub mod bool;
81pub mod char;
82pub mod collection;
83pub mod num;
84pub mod strategy;
85pub mod test_runner;
86pub mod tuple;
87
88pub mod option;
89#[cfg(feature = "std")]
90#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
91pub mod path;
92pub mod result;
93pub mod sample;
94#[cfg(feature = "std")]
95#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
96pub mod string;
97
98pub mod prelude;
99
100#[cfg(feature = "attr-macro")]
101pub use proptest_macro::property_test; 
102
103#[cfg(feature = "attr-macro")]
104#[test]
105fn compile_tests() {
106    let t = trybuild::TestCases::new();
107    t.pass("tests/pass/*.rs");
108}