Skip to main content

TestCase

Struct TestCase 

Source
pub struct TestCase {
    pub circuit: String,
    pub description: String,
    pub signals: Vec<SignalConfig>,
    pub metrics: Vec<MetricConfig>,
    pub pass_criteria: PassCriteria,
    pub warmup_trim_ms: Option<f64>,
    pub pending_reference: bool,
    pub pro_circuit_path: Option<String>,
}
Expand description

A single test case.

Fields§

§circuit: String

Path to the circuit file (.pedal for WDF, .spice for reference)

§description: String§signals: Vec<SignalConfig>§metrics: Vec<MetricConfig>§pass_criteria: PassCriteria§warmup_trim_ms: Option<f64>

Per-test warmup trim in milliseconds. None means use the global GlobalConfig::warmup_trim_ms value.

§pending_reference: bool

Pending-reference flag. When true AND the golden .npy is missing, the test is reported as PENDING (skipped) and excluded from BOTH the passed count and the total in the pass-rate gate — so a committed test whose ngspice golden has not yet been generated does not move the gate denominator. Once the golden file is dropped in, the test runs and is compared normally REGARDLESS of this flag (auto-activation, no code change). A false (default) test with a missing golden still FAILS loudly, so accidental golden deletion is caught.

§pro_circuit_path: Option<String>

Path to the WDF .pedal source relative to the pedalkernel-pro repo root.

Set this for circuits whose .pedal files are proprietary (live in pedalkernel-pro, never committed to the public engine repo). When the public circuit path is not found in --circuits, the bootstrap command falls back to probing ancestor directories for pedalkernel-pro/<pro_circuit_path> via the same sibling-directory search used by pro_pedal::load_pro_pedal_sub.

None means no private fallback: the circuit must exist at circuit.

Implementations§

Source§

impl TestCase

Source

pub fn effective_warmup_trim_ms(&self, global: &GlobalConfig) -> f64

Resolve the effective warmup trim in milliseconds, preferring the per-test override when set, otherwise falling back to the global value.

Source

pub fn effective_settle_ms(&self, global: &GlobalConfig) -> f64

Resolve the effective STEADY-STATE settle window in milliseconds.

A per-test warmup_trim_ms override IS that test’s settle window (a slow circuit sets it explicitly, e.g. 800 ms for the BA283’s 10 µF coupling caps); otherwise the conservative GlobalConfig::settle_ms default applies. Generators run long enough to cover this window and metrics are computed only on the settled tail past it.

Source

pub fn effective_profile( &self, suite_name: &str, test_name: &str, ) -> ValidationProfile

Classify the test into a reporting bucket without changing pass/fail behavior. This keeps threshold intent visible while legacy configs are migrated toward explicit profiles.

Trait Implementations§

Source§

impl Clone for TestCase

Source§

fn clone(&self) -> TestCase

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TestCase

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TestCase

Source§

fn default() -> TestCase

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for TestCase

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TestCase

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more