Documentation
¶
Overview ¶
Package fakes holds the deterministic test doubles wowapi injects through the same constructors production uses (08 §2): a manual-advance clock and a deterministic IDGen. No test hooks live in production code — tests supply these where production supplies real implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
// contains filtered or unexported fields
}
Clock is a manual-advance fake time source. It satisfies the ambient interface{ Now() time.Time } the kernel expects, but never moves on its own — tests call Advance to make time pass deterministically. Safe for concurrent use.
type IDGen ¶
type IDGen struct {
// contains filtered or unexported fields
}
IDGen is a deterministic model.IDGen: every New() encodes a seed in byte 0 and a big-endian counter in the last 8 bytes, with valid RFC 4122 v7 version and variant bits set. The result is stable across runs and readable in failure output — e.g. seed 0x01, first call → 01000000-0000-7000-8000-000000000001. Safe for concurrent use.