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

Function test_package_only

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

Source from the content-addressed store, hash-verified

1021
1022 #[test]
1023 fn test_package_only() {
1024 let mut parser = JavaParser::new();
1025 let source = "package com.example;\n";
1026 let entities = parser.extract(source, "package-info.java");
1027 // Should not crash, package declarations are skipped
1028 assert!(
1029 !entities
1030 .iter()
1031 .any(|e| e.kind == EntityKind::Module && e.name == "com.example"),
1032 "Package declarations should be skipped"
1033 );
1034 }
1035
1036 #[test]
1037 fn test_line_numbers() {

Callers

nothing calls this directly

Calls 1

extractMethod · 0.45

Tested by

no test coverage detected