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

Function test_package_only

atomic-semantic/src/parsers/java.rs:1000–1011  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

998
999 #[test]
1000 fn test_package_only() {
1001 let mut parser = JavaParser::new();
1002 let source = "package com.example;\n";
1003 let entities = parser.extract(source, "package-info.java");
1004 // Should not crash, package declarations are skipped
1005 assert!(
1006 !entities
1007 .iter()
1008 .any(|e| e.kind == EntityKind::Module && e.name == "com.example"),
1009 "Package declarations should be skipped"
1010 );
1011 }
1012
1013 #[test]
1014 fn test_line_numbers() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected