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(feature = "f16", feature(f16))]
30#![cfg_attr(all(feature = "std", feature = "unstable"), feature(ip))]
31#![cfg_attr(docsrs, feature(doc_cfg))]
32
33// std_facade is used in a few macros, so it needs to be public.
34#[macro_use]
35#[doc(hidden)]
36pub mod std_facade;
37
38#[cfg(any(feature = "std", test))]
39#[macro_use]
40extern crate std;
41
42#[cfg(all(feature = "alloc", not(feature = "std")))]
43#[macro_use]
44extern crate alloc;
45
46#[macro_use]
47mod product_tuple;
48
49#[macro_use]
50extern crate bitflags;
51#[cfg(feature = "bit-set")]
52extern crate bit_set;
53
54#[cfg(feature = "fork")]
55#[macro_use]
56extern crate rusty_fork;
57
58#[macro_use]
59mod macros;
60
61#[doc(hidden)]
62#[macro_use]
63pub mod sugar;
64
65pub mod arbitrary;
66pub mod array;
67pub mod bits;
68pub mod bool;
69pub mod char;
70pub mod collection;
71pub mod num;
72#[cfg(feature = "std")]
73pub mod range_subset;
74pub mod strategy;
75pub mod test_runner;
76pub mod tuple;
77
78pub mod option;
79#[cfg(feature = "std")]
80#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
81pub mod path;
82pub mod result;
83pub mod sample;
84#[cfg(feature = "std")]
85#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
86pub mod string;
87
88pub mod prelude;
89
90#[cfg(feature = "attr-macro")]
91pub use proptest_macro::property_test;
92
93#[cfg(feature = "attr-macro")]
94#[test]
95fn compile_tests() {
96    let t = trybuild::TestCases::new();
97    t.pass("tests/pass/*.rs");
98}