silk/test_exchange
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc.
Strict binary plans and receipts for private control of the ordinary Silk test runner. Test output uses inherited stdout and stderr and has no result authority.
Import as TestExchange with import silk.test_exchange as TestExchange.
Public declarations: 18.
Plan
pub struct Plan<'a>A cursor over one borrowed host plan.
Entry
pub struct Entry<'a>One borrowed per-test plan entry.
Receipt
pub struct ReceiptAn owned receipt under construction.
openPlan
pub fn openPlan<'a>(bytes: &'a [u8]) -> silk/test_exchange.Plan<'a>Opens a plan and validates its common magic, version, mode, and nonce framing.
isPerTest
pub fn isPerTest<'life0, 'life1>(plan: &'life0 silk/test_exchange.Plan<'life1>) -> boolReturns true when this is the bounded per-test mode.
isUncached
pub fn isUncached<'life0, 'life1>(plan: &'life0 silk/test_exchange.Plan<'life1>) -> boolReturns true when this is the fixed-size uncached mode.
failed
pub fn failed<'life0, 'life1>(plan: &'life0 silk/test_exchange.Plan<'life1>) -> boolReturns whether parsing has rejected the plan.
beginPerTest
pub fn beginPerTest<'life0, 'life1>(plan: &'life0 mut silk/test_exchange.Plan<'life1>, expectedDiscovered: u64) -> boolValidates the per-test count and complete-file bound before any test body may run.
readEntry
pub fn readEntry<'a, 'life1, 'life2>(plan: &'life1 mut silk/test_exchange.Plan<'a>, expectedOrdinal: u64, expectedDeclaration: &'life2 [u8]) -> silk/test_exchange.Entry<'a>Reads and validates the next canonical catalog entry.
cached
pub fn cached<'life0, 'life1>(entry: &'life0 silk/test_exchange.Entry<'life1>) -> boolReturns true when an entry is a validated cache hit.
executionIdentity
pub fn executionIdentity<'a, 'life1>(entry: &'life1 silk/test_exchange.Entry<'a>) -> &'a [u8]Borrows the opaque execution identity carried by an entry.
uncachedEntry
pub fn uncachedEntry<'a>(bytes: &'a [u8]) -> silk/test_exchange.Entry<'a>Returns the empty non-cached entry used by aggregate uncached execution.
finishPerTest
pub fn finishPerTest<'life0, 'life1>(plan: &'life0 mut silk/test_exchange.Plan<'life1>) -> boolRequires the complete per-test plan to end exactly after the catalog.
validateUncached
pub fn validateUncached<'life0, 'life1, 'life2>(plan: &'life0 mut silk/test_exchange.Plan<'life1>, expectedCatalogDigest: &'life2 [u8], expectedDiscovered: u64) -> boolValidates an exact 256-byte compact plan, including catalog binding and zero padding.
updateCatalogDigest
pub fn updateCatalogDigest<'life0, 'life1>(state: &'life0 mut silk/sha2.Sha256, ordinal: u64, identity: &'life1 [u8]) -> ()Frames one catalog identity into the compact-mode catalog digest.
beginReceipt
pub effect<'life0> fn beginReceipt<'life0>(plan: &'life0 [u8], perTest: bool, selected: u64) -> Receipt ! OutOfMemoryError ? &mut AllocatorStarts a receipt bound to the complete plan bytes and invocation nonce.
appendResult
pub effect<'life0 & 'life1 & 'life2> fn appendResult<'life0, 'life1, 'life2>(receipt: &'life0 mut silk/test_exchange.Receipt, ordinal: u64, declaration: &'life1 [u8], execution: &'life2 [u8], disposition: u8) -> () ! OutOfMemoryError ? &mut AllocatorAppends one selected per-test result in canonical ordinal order.
finishReceipt
pub effect<'static> fn finishReceipt(receipt: Receipt, discovered: u64, selected: u64, cachedCount: u64, executed: u64, passed: u64, failedCount: u64, status: u32) -> Bytes ! OutOfMemoryError ? &mut AllocatorFinishes a complete receipt. Compact mode is padded to exactly 256 bytes.