agent-joule/crates/agent_mei_panel/tests/conformance.rs
David Charlot 7a59f0ffc5 agent-mei: rename agent_joule panel/theme/workflows to agent-mei, MEI fleet wiring and honest-energy receipts
Brings over the uncommitted agent-mei work (Mac checkout, Sep 22) plus box
follow-ups (Oct 17: agent_mei action namespace in keymap/zed.rs, MEI_BRIDGE.md,
RENAME_AGENT_MEI.md, unmetered receipts report 0 uJ). joule_core, JOULE_CODE_*
and JouleDB names unchanged. *.bak.* scratch files excluded.
2026-10-27 12:59:12 -04:00

28 lines
1 KiB
Rust
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! Joule Code conformance (SPEC §8): agent-mei, the standard's reference
//! *consumer*, runs the published C1–C5 wire-vector suites against the version
//! of the standard it builds on. The vectors are vendored under
//! `tests/conformance/v1/` from `open-standards` at the dependency's pinned rev
//! (see that directory's README). A failure here means the consumer and the
//! standard have drifted.
use std::path::Path;
#[test]
fn published_vector_pack_passes() {
let dir = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/conformance/v1");
let report = joule_code_conformance::verify_pack(&dir)
.unwrap_or_else(|error| panic!("running the conformance pack failed: {error}"));
assert_eq!(
report.fail,
0,
"conformance vectors failed:\n{}",
report.lines.join("\n")
);
// Guard against a vacuous pass (e.g. empty vector files).
assert!(
report.pass > 0,
"expected at least one passing vector; report:\n{}",
report.lines.join("\n")
);
}