adze_governance_matrix_core_impl/
lib.rs1#![forbid(unsafe_op_in_unsafe_fn)]
6#![deny(missing_docs)]
7#![cfg_attr(feature = "strict_api", deny(unreachable_pub))]
8#![cfg_attr(not(feature = "strict_api"), warn(unreachable_pub))]
9#![cfg_attr(feature = "strict_docs", deny(missing_docs))]
10#![cfg_attr(not(feature = "strict_docs"), allow(missing_docs))]
11
12pub use adze_bdd_governance_core::*;
13
14#[cfg(test)]
15mod tests {
16 use super::*;
17
18 #[test]
19 fn facade_exports_bdd_phase() {
20 let core = BddPhase::Core;
21 let runtime = BddPhase::Runtime;
22 assert_ne!(core, runtime);
23 }
24
25 #[test]
26 fn facade_exports_governance_snapshot() {
27 let snap = BddGovernanceSnapshot {
28 phase: BddPhase::Core,
29 implemented: 0,
30 total: 0,
31 profile: ParserFeatureProfile::current(),
32 };
33 assert!(snap.is_fully_implemented()); }
35
36 #[test]
37 fn facade_exports_governance_matrix() {
38 let profile = ParserFeatureProfile::current();
39 let matrix = BddGovernanceMatrix::standard(profile);
40 let snap = matrix.snapshot();
41 assert_eq!(snap.profile, profile);
42 }
43
44 #[test]
45 fn facade_exports_glr_conflict_fallback() {
46 assert!(!GLR_CONFLICT_FALLBACK.is_empty());
47 }
48
49 #[test]
50 fn facade_exports_describe_backend() {
51 let profile = ParserFeatureProfile::current();
52 let desc = describe_backend_for_conflicts(profile);
53 assert!(!desc.is_empty());
54 }
55
56 #[test]
57 fn facade_exports_bdd_progress_report() {
58 let report =
59 bdd_progress_report(BddPhase::Core, GLR_CONFLICT_PRESERVATION_GRID, "Impl Test");
60 assert!(report.contains("Impl Test"));
61 }
62
63 #[test]
64 fn facade_exports_bdd_progress_report_with_profile() {
65 let profile = ParserFeatureProfile::current();
66 let report = bdd_progress_report_with_profile(
67 BddPhase::Runtime,
68 GLR_CONFLICT_PRESERVATION_GRID,
69 "Profile Report",
70 profile,
71 );
72 assert!(report.contains("Profile Report"));
73 }
74
75 #[test]
76 fn facade_exports_bdd_progress_status_line() {
77 let profile = ParserFeatureProfile::current();
78 let status =
79 bdd_progress_status_line(BddPhase::Core, GLR_CONFLICT_PRESERVATION_GRID, profile);
80 assert!(status.starts_with("core:"));
81 }
82
83 #[test]
84 fn facade_snapshot_is_fully_implemented_variations() {
85 let full = BddGovernanceSnapshot {
86 phase: BddPhase::Core,
87 implemented: 5,
88 total: 5,
89 profile: ParserFeatureProfile::current(),
90 };
91 assert!(full.is_fully_implemented());
92
93 let partial = BddGovernanceSnapshot {
94 phase: BddPhase::Runtime,
95 implemented: 2,
96 total: 5,
97 profile: ParserFeatureProfile::current(),
98 };
99 assert!(!partial.is_fully_implemented());
100 }
101
102 #[test]
103 fn facade_matrix_new_constructor() {
104 let profile = ParserFeatureProfile::current();
105 let matrix =
106 BddGovernanceMatrix::new(BddPhase::Core, profile, GLR_CONFLICT_PRESERVATION_GRID);
107 assert_eq!(matrix.phase, BddPhase::Core);
108 assert_eq!(matrix.profile, profile);
109 }
110
111 #[test]
112 fn facade_glr_conflict_fallback_non_empty() {
113 assert!(!GLR_CONFLICT_FALLBACK.is_empty());
114 }
115}