MCPcopy Create free account
hub / github.com/Canop/codesort / test_match_struct

Function test_match_struct

tests/rust_structs.rs:78–92  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76
77#[test]
78fn test_match_struct() {
79 let list = LocList::read_str(INPUT, Language::Rust).unwrap();
80 //list.print_debug(" WHOLE ");
81 let focused = list.focus_all().unwrap();
82 focused.print_debug();
83 {
84 let blocks = focused.clone().focus.into_blocks();
85 for (i, block) in blocks.iter().enumerate() {
86 block.print_debug(&format!(" BLOCK {i}"));
87 }
88 }
89 let sorted_list = focused.sort();
90 sorted_list.print_debug(" SORTED ");
91 assert_eq!(sorted_list.to_string(), OUTPUT);
92}

Callers

nothing calls this directly

Calls 4

focus_allMethod · 0.80
into_blocksMethod · 0.80
sortMethod · 0.80
print_debugMethod · 0.45

Tested by

no test coverage detected