MCPcopy Create free account
hub / github.com/Hessesian/kmp-lsp / java_constructor_indexed

Function java_constructor_indexed

src/parser_tests.rs:488–505  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

486
487#[test]
488fn java_constructor_indexed() {
489 let data = parse_java("public class Foo {\n public Foo(int x) {}\n}");
490 let ctor = sym(&data, "Foo");
491 // class Foo AND constructor Foo both parsed; at least one must be CONSTRUCTOR
492 let has_ctor = data
493 .symbols
494 .iter()
495 .any(|s| s.name == "Foo" && s.kind == SymbolKind::CONSTRUCTOR);
496 assert!(
497 has_ctor,
498 "constructor not found: {:?}",
499 data.symbols
500 .iter()
501 .map(|s| (&s.name, s.kind))
502 .collect::<Vec<_>>()
503 );
504 let _ = ctor;
505}
506
507#[test]
508fn java_static_final_field_is_constant() {

Callers

nothing calls this directly

Calls 2

symFunction · 0.85
parse_javaFunction · 0.70

Tested by

no test coverage detected