jugar_probar/presentar/mod.rs
1//! Presentar YAML support for probar.
2//!
3//! This module provides native support for testing presentar YAML configurations,
4//! enabling automated validation of TUI dashboards, terminal rendering, and
5//! falsification protocols.
6//!
7//! # Architecture
8//!
9//! ```text
10//! ┌─────────────────────────────────────────────────────────┐
11//! │ Presentar Integration │
12//! ├─────────────────────────────────────────────────────────┤
13//! │ schema.rs → YAML schema types (PresentarConfig) │
14//! │ validator.rs → Config validation rules │
15//! │ terminal.rs → CellBuffer snapshot assertions │
16//! │ falsification.rs → F001-F100 generator │
17//! └─────────────────────────────────────────────────────────┘
18//! ```
19//!
20//! # References
21//!
22//! - Tretmans (2008): Model-Based Testing of Reactive Systems
23//! - Claessen & Hughes (2000): QuickCheck property-based testing
24//! - Jia & Harman (2011): Mutation Testing theory
25
26mod falsification;
27mod schema;
28mod terminal;
29mod validator;
30
31pub use falsification::{generate_falsification_playbook, FalsificationCheck, FalsificationResult};
32pub use schema::{
33 KeybindingConfig, LayoutConfig, PanelConfig, PanelConfigs, PanelType, PresentarConfig,
34 ThemeConfig,
35};
36pub use terminal::{Cell, Color, TerminalAssertion, TerminalSnapshot};
37pub use validator::{parse_and_validate, validate_config, PresentarError, ValidationResult};
38
39/// Presentar schema version supported by this module.
40pub const SCHEMA_VERSION: &str = "1.0";
41
42/// Number of falsification checks (F001-F100).
43pub const FALSIFICATION_COUNT: usize = 100;
44
45#[cfg(test)]
46mod tests {
47 use super::*;
48
49 #[test]
50 fn test_schema_version() {
51 assert_eq!(SCHEMA_VERSION, "1.0");
52 }
53
54 #[test]
55 fn test_falsification_count() {
56 assert_eq!(FALSIFICATION_COUNT, 100);
57 }
58}