Skip to main content

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;
71#[cfg(feature = "std")]
72pub mod range_subset;
73pub mod strategy;
74pub mod test_runner;
75pub mod tuple;
76
77pub mod option;
78#[cfg(feature = "std")]
79#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
80pub mod path;
81pub mod result;
82pub mod sample;
83#[cfg(feature = "std")]
84#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
85pub mod string;
86
87pub mod prelude;
88
89#[cfg(feature = "attr-macro")]
90pub use proptest_macro::property_test;
91
92#[cfg(feature = "attr-macro")]
93#[test]
94fn compile_tests() {
95    let t = trybuild::TestCases::new();
96    t.pass("tests/pass/*.rs");
97}