Initial commit: Fabrilis docs, rules and deterministic core
Docs (architecture, decisions, coupling, determinism, UI, references), code rules enforced by tools/limits, deterministic core with units, time, math, sched, snapshot, vec and rng, plus smoke tests. ref/ stays out of git.
This commit is contained in:
commit
878d144b77
221 changed files with 5316 additions and 0 deletions
14
crates/core/src/id/tests.rs
Normal file
14
crates/core/src/id/tests.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use super::*;
|
||||
|
||||
struct Part;
|
||||
|
||||
#[test]
|
||||
fn ids_are_sequential_and_ordered() {
|
||||
let mut generator = IdGen::<Part>::default();
|
||||
let a = generator.alloc();
|
||||
let b = generator.alloc();
|
||||
assert_eq!((a.raw(), b.raw()), (0, 1));
|
||||
assert!(a < b);
|
||||
assert_eq!(b.index(), 1);
|
||||
assert_eq!(format!("{a:?}"), "Id(0)");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue