MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / self_referencing_class

Function self_referencing_class

src/toposort.rs:466–476  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

464
465 #[test]
466 fn self_referencing_class() {
467 // A class that lists itself as a mixin (degenerate case).
468 let mut a = make_class("A");
469 a.mixins = vec![crate::atom::atom("A")];
470
471 let classes = vec![("A".to_string(), &a)];
472
473 let sorted = toposort_classes(classes.into_iter());
474
475 assert_eq!(sorted, vec!["A".to_string()]);
476 }
477
478 #[test]
479 fn complex_graph_with_multiple_dep_types() {

Callers

nothing calls this directly

Calls 3

toposort_classesFunction · 0.85
into_iterMethod · 0.80
make_classFunction · 0.70

Tested by

no test coverage detected