computeblock!() { /* proc-macro */ }Expand description
Macro for defining a ComputeBlock with mandatory test coverage.
A ComputeBlock is a self-contained unit of functionality that:
- Has a defined interface (via tests)
- Has documented behavior (via tests)
- Cannot exist without tests
§Example
ⓘ
// Define the block - this REQUIRES tests to exist
computeblock! {
name: CpuPanel,
interface: [
per_core_freq: Vec<u64>,
per_core_temp: Vec<f32>,
],
tests: "tests/cpu_panel_interface.rs"
}