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

Function test_extract_import

atomic-semantic/src/parsers/swift.rs:826–842  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

824
825 #[test]
826 fn test_extract_import() {
827 let mut parser = SwiftParser::new();
828 let source = r#"
829import Foundation
830import UIKit
831"#;
832 let entities = parser.extract(source, "app.swift");
833 let imports: Vec<_> = entities
834 .iter()
835 .filter(|e| e.kind == EntityKind::Import)
836 .collect();
837 assert!(
838 imports.len() >= 2,
839 "Should find at least 2 imports, got: {:?}",
840 imports.iter().map(|e| &e.name).collect::<Vec<_>>()
841 );
842 }
843
844 #[test]
845 fn test_extract_method_in_class() {

Callers

nothing calls this directly

Calls 2

extractMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected