init: archlens — architecture diagram generator
Some checks failed
CI / Check / Test (push) Failing after 1m24s
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.
This commit is contained in:
21
crates/domain/tests/analysis_warning_tests.rs
Normal file
21
crates/domain/tests/analysis_warning_tests.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
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());
|
||||
}
|
||||
Reference in New Issue
Block a user