MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_line_numbers

Function test_line_numbers

atomic-semantic/src/parsers/rust.rs:946–957  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

944
945 #[test]
946 fn test_line_numbers() {
947 let mut parser = RustParser::new();
948 let source = r#"
949fn first() {}
950
951fn second() {}
952"#;
953 let entities = parser.extract(source, "lines.rs");
954 let first = entities.iter().find(|e| e.name == "first").unwrap();
955 let second = entities.iter().find(|e| e.name == "second").unwrap();
956 assert!(first.line < second.line);
957 }
958
959 #[test]
960 fn test_language() {

Callers

nothing calls this directly

Calls 3

extractMethod · 0.45
unwrapMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected