Skip to main content

graphy_core/
lib.rs

1pub mod diff;
2pub mod error;
3pub mod gir;
4pub mod graph;
5pub mod storage;
6pub mod symbol_id;
7
8pub use error::GraphyError;
9pub use gir::*;
10pub use graph::CodeGraph;
11pub use symbol_id::SymbolId;
12
13#[cfg(test)]
14mod tests {
15    use super::*;
16
17    #[test]
18    fn reexports_available() {
19        // Verify key re-exports work
20        let _graph = CodeGraph::new();
21        let _id = SymbolId::new(std::path::Path::new("test.rs"), "test", NodeKind::Function, 1);
22        let _err = GraphyError::Storage("test".into());
23    }
24
25    #[test]
26    fn gir_types_reexported() {
27        // GirNode, GirEdge, NodeKind, EdgeKind, Span should all be available
28        let span = Span::new(1, 0, 10, 0);
29        let node = GirNode::new(
30            "test".into(),
31            NodeKind::Function,
32            std::path::PathBuf::from("test.rs"),
33            span,
34            Language::Rust,
35        );
36        let _edge = GirEdge::new(EdgeKind::Calls);
37        assert_eq!(node.name, "test");
38    }
39
40    #[test]
41    fn parse_output_reexported() {
42        let _output = ParseOutput::new();
43    }
44}