Expand description
Test utilities provided to all crates.
Structs§
- Fake
Atomic Instant - A fake implementation of
AtomicInstant
for use in testing. - Fake
Bindings Ctx - A test helper used to provide an implementation of a bindings context.
- Fake
Core Ctx - A test helper used to provide an implementation of a core context.
- Fake
Crypto Rng - A wrapper which implements
RngCore
andCryptoRng
for anyRngCore
. - Fake
Device Id - A fake device ID for use in testing.
- Fake
Event Ctx - A fake
EventContext
. - Fake
Frame Ctx - A fake [
FrameContext
]. - Fake
Instant - A fake implementation of
Instant
for use in testing. - Fake
Instant Ctx - A fake
InstantContext
which stores the current time as aFakeInstant
. - Fake
Link Address - A fake
LinkAddress
. - Fake
Link Device Id - A fake ID identifying a
FakeLinkDevice
. - Fake
Network - A fake network, composed of many
FakeCoreCtx
s. - Fake
Referency Device Id - A fake device ID for use in testing.
- Fake
Socket Writable Listener - A fake
SocketWritableListener
implementation. - Fake
Timer Ctx - A fake
TimerContext
which stores time as aFakeInstantCtx
. - Fake
Timer Id - The unique timer identifier for [
FakeTimer
]. - Fake
TxMetadata - The fake metadata supported by
FakeBindingsCtx
. - Fake
Weak Address Id - A fake weak address ID.
- Fake
Weak Device Id - A fake weak device id.
- Instant
AndData - Arbitrary data of type
D
attached to aFakeInstant
. - Monotonic
Identifier - A convenient monotonically increasing identifier to use in tests.
- Multiple
Devices IdState - Holds per-device state for a
MultipleDevicesId
. - Pending
Frame Data - The data associated with a
FakeNetwork
’s pending frame. - Real
Bencher - An alias for the bencher used in real benchmarks. Timer struct to iterate a benchmarked function and measure the runtime.
- Step
Result - The result of a single step in a
FakeNetwork
- Test
Addrs - A configuration for a simple network.
- Test
Bencher - A
Bencher
whoseiter
method runs the provided argument a small, fixed number of times.
Enums§
- Fake
Link Device - A fake
LinkDevice
. - Multiple
Devices Id - A device ID type that supports identifying more than one distinct device.
Constants§
- TEST_
ADDRS_ V4 - A
TestAddrs
with reasonable values for an IPv4 network. - TEST_
ADDRS_ V6 - A
TestAddrs
with reasonable values for an IPv6 network.
Traits§
- Always
Defaults Settings Context - A marker trait that allows a type to implement
SettingsContext
that always yields a default value for the settings type. - Bencher
- A trait to allow faking of the type providing benchmarking.
- Fake
Network Links - A set of links in a
FakeNetwork
. - Fake
Network Spec - A network spec that defines a
FakeNetwork
. - Fake
Strong Device Id - Marks a fake strong device id.
- Fake
Timer CtxExt - Adds methods for interacting with
FakeTimerCtx
and its wrappers. - Test
Dual Stack IpExt - An extension trait for
Ip
providing test-related functionality. - Test
IpExt - An extension trait for
Ip
providing test-related functionality. - With
Fake Frame Context - A trait for abstracting contexts that may contain a
FakeFrameCtx
. - With
Fake Timer Context - A trait abstracting access to a
FakeTimerCtx
instance.
Functions§
- assert_
empty - Asserts that an iterable object produces zero items.
- new_rng
- Create a new deterministic RNG from a seed.
- run_
with_ many_ seeds - Invokes a function multiple times with different RNG seeds.
- set_
logger_ for_ test - Install a logger for tests.
Type Aliases§
- Pending
Frame - A
PendingFrameData
and the instant it was sent.