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

Function test_match_struct

tests/rust_match_struct.rs:82–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

into_blocksMethod · 0.80
sortMethod · 0.80
print_debugMethod · 0.45

Tested by

no test coverage detected