[][src]Module capsule::testils

This is supported on feature="testils" only.

Utilities for unit tests and benchmarks.

Modules

byte_arraysfeature="testils"

Hand-crafted packet byte-arrays for testing.

criterionfeature="testils"

Iterator extensions to criterion, leveraging proptest strategy generators.

proptestfeature="testils"

Defines extended proptest Arbitrary and Strategy traits for packet generation and manipulation for testing and benchmarking purposes.

Structs

MempoolGuardfeature="testils"

A handle that keeps the mempool in scope for the duration of the test. It will unset the thread-bound mempool on drop.

Rvgfeature="testils"

A random value generator (RVG), which, given proptest strategies, will generate random values based on those strategies.

Traits

PacketExtfeature="testils"

Packet extension trait.

Functions

cargo_test_initfeature="testils"

Run once initialization of EAL for cargo test.

new_mempoolfeature="testils"

Creates a new mempool for test that automatically cleans up after the test completes.