Some checks failed
CI / Check / Test (push) Failing after 1m24s
Hex arch + DDD, tree-sitter parsing, Mermaid/ASCII output. Supports Rust + Python. 92 tests. CI, diff, --check for staleness detection.
22 lines
609 B
Rust
22 lines
609 B
Rust
use archlens_domain::{AnalysisWarning, FilePath};
|
|
|
|
#[test]
|
|
fn warning_carries_location_and_message() {
|
|
let warning = AnalysisWarning::new(
|
|
FilePath::new("src/broken.rs").unwrap(),
|
|
42,
|
|
"could not parse struct definition",
|
|
)
|
|
.unwrap();
|
|
|
|
assert_eq!(warning.file_path().as_str(), "src/broken.rs");
|
|
assert_eq!(warning.line(), 42);
|
|
assert_eq!(warning.message(), "could not parse struct definition");
|
|
}
|
|
|
|
#[test]
|
|
fn warning_rejects_empty_message() {
|
|
let result = AnalysisWarning::new(FilePath::new("src/broken.rs").unwrap(), 1, "");
|
|
assert!(result.is_err());
|
|
}
|