Intrepid/Prometeu/Runtime/pipeline/pr-master This commit looks good
Add structural Fn signatures, typed capture environments, indirect calls and Trait dispatch while preserving logical parameter and result groups, ownership and budgets. Remove guest coroutine execution and legacy loading. Activate bounded sealed PBX v1 with mandatory capture metadata, preserve frame continuations and root return results, and migrate producers and shipped cartridges. Publish coordinated specs, handoffs and the completed runtime lesson. Validation: 880 workspace tests passed, 9 existing tests ignored; both cartridges completed six production-host frames.
30 lines
949 B
Rust
30 lines
949 B
Rust
//! Minimal, robust smoke test for the VM crate.
|
|
//!
|
|
//! Intentionally does not assert legacy ISA behavior. It only ensures that:
|
|
//! - The VM type can be instantiated without panicking.
|
|
//! - Deterministic test utilities work as expected (reproducible RNG).
|
|
|
|
use prometeu_test_support::{next_u64, rng_from_seed};
|
|
use prometeu_vm::VirtualMachine;
|
|
|
|
#[test]
|
|
fn vm_instantiation_is_stable() {
|
|
// Create a VM with empty ROM and empty constant pool.
|
|
let vm = VirtualMachine::default();
|
|
// Basic invariant checks that should remain stable across refactors.
|
|
assert_eq!(vm.pc(), 0);
|
|
assert!(vm.is_halted());
|
|
}
|
|
|
|
#[test]
|
|
fn deterministic_rng_sequences_match() {
|
|
// Demonstrate deterministic behavior without relying on specific values.
|
|
let mut a = rng_from_seed(12345);
|
|
let mut b = rng_from_seed(12345);
|
|
|
|
for _ in 0..8 {
|
|
// Same seed => same sequence
|
|
assert_eq!(next_u64(&mut a), next_u64(&mut b));
|
|
}
|
|
}
|