[][src]Module un_algebra::tests::config

Testing configurations for proptest tests.

un_algebra generative tests suites are built on the proptest generative testing crate. proptest supports testing with run time "configurations" that control, among other things, the number of tests performed.

The config module provides pre-defined testing configuration helpers to un_algebra tests built on proptest.

Modules

prop

Re-exports the entire public API of proptest so that an import of prelude allows simply writing, for example, prop::num::i32::ANY rather than proptest::num::i32::ANY plus a separate use proptest;.

Macros

prop_assert

Similar to assert! from std, but returns a test failure instead of panicking if the condition fails.

prop_assert_eq

Similar to assert_eq! from std, but returns a test failure instead of panicking if the condition fails.

prop_assert_ne

Similar to assert_ne! from std, but returns a test failure instead of panicking if the condition fails.

prop_assume

Rejects the test input if assumptions are not met.

prop_compose

Convenience to define functions which produce new strategies.

prop_oneof

Produce a strategy which picks one of the listed choices.

proptest

Easily define proptest tests.

Structs

Config

Configuration for how a proptest test should be run.

MapFailurePersistence

Failure persistence option that loads and saves seeds in memory on the heap. This may be useful when accumulating test failures across multiple TestRunner instances for external reporting or batched persistence.

PersistedSeed

Opaque struct representing a seed which can be persisted.

Reason

The reason for why something, such as a generated value, was rejected.

ResultCacheKey

A key used for the result cache.

TestRng

Proptest's random number generator.

TestRunner

State used when running a proptest test.

Enums

FileFailurePersistence

Describes how failing test cases are persisted.

RngAlgorithm

Identifies a particular RNG algorithm supported by proptest.

TestCaseError

Errors which can be returned from test cases to indicate non-successful completion.

TestError

A failure state from running test cases for a single test.

Traits

FailurePersistence

Provides external persistence for historical test failures by storing seeds.

ResultCache

An object which can cache the outcomes of tests.

Rng

An automatically-implemented extension trait on RngCore providing high-level generic methods for sampling values and other convenience methods.

RngCore

The core of a random number generator.

Functions

basic_result_cache

A basic result cache.

config_with

A configuration with choice of cases and rejects.

noop_result_cache

A result cache that does nothing.

standard

A "standard" configuration with 1,000 cases, 400% rejects.

Type Definitions

TestCaseResult

Convenience for the type returned by test cases.