unityrs_testkit/lib.rs
1//! Synthetic Unity files built in code, for unityrs tests.
2//!
3//! Everything here is made from scratch by the builders: never game data,
4//! never bytes copied from a real file. The builders return `Vec<u8>` and
5//! know nothing of `unityrs-core`, so core's own tests can use them (but
6//! for `core_counters`, under the `test-counters` feature alone).
7//!
8//! Owners (docs/plans/core.md section 7): [`writer`], [`rng`],
9//! [`public_types`] (the `Send + Sync` source scan the crates' tests share)
10//! and [`waits`] (the no-thread, no-wait source scan) are the scaffold's
11//! (implemented); [`blob`], [`serialized`] and [`bundle`] are package C's;
12//! [`env`](mod@env) is package D's; [`depth`] (the deep values of plan
13//! section 3.10), [`counted`] (the counting global allocator, and the
14//! thread it counts), [`guard`] (the deadlock guard of every test that
15//! hands work between threads), [`stack`] (the child-process probes that
16//! measure a stack, and tell an overflow from every other failure) and
17//! [`child`] (how every test runs a child process: a `SIGKILL` from
18//! outside is no result) and [`scratch`] (how every test's scratch is
19//! removed, whatever happens to the test or its child) are package B's;
20//! [`ledger`] (one coherent observation of a counted engine's heap and
21//! charges) and [`search`] (a limit's need, its monotonicity checked) are
22//! the memory gates' (`docs/plans/extract.md` X12, X13); [`address_space`] (the cap that makes the C allocator
23//! refuse, for the tests of liblzma's own allocations) is package C's;
24//! [`mutate`] (G3b's mutator) is the integration's; [`fuzz`] (the fuzz
25//! targets' input layouts, which `examples/fuzz_seeds.rs` writes the seeds
26//! in) is the fuzz package's; [`ngui`] (the NGUI-shaped atlases the cutter's
27//! reference, `tools/parity/ngui_cutter.py`, is tested and recorded on) is
28//! P1b's.
29
30pub mod address_space;
31pub mod blob;
32pub mod bundle;
33pub mod child;
34pub mod counted;
35pub mod depth;
36pub mod env;
37pub mod fsb5;
38pub mod fuzz;
39pub mod guard;
40pub mod ledger;
41pub mod mutate;
42pub mod ngui;
43pub mod public_types;
44pub mod rng;
45pub mod scene3d;
46pub mod scratch;
47pub mod search;
48pub mod serialized;
49pub mod stack;
50pub mod waits;
51pub mod web;
52pub mod writer;
53pub mod zip;
54
55pub use rng::Rng;
56pub use writer::ByteWriter;
57
58/// The core's test-only counters (`docs/plans/batch.md` section 6, CR8),
59/// under this crate's `test-counters` feature, which turns the core's
60/// feature of the same name on for every crate a test build links. The
61/// core's own unit tests read `unityrs_core::testing` instead: theirs is
62/// the core built for the test, this the library build's.
63#[cfg(feature = "test-counters")]
64pub use unityrs_core::testing as core_counters;