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

Function test_struct_fields

tests/rust_struct_fields.rs:140–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138
139#[test]
140fn test_struct_fields() {
141 let list = LocList::read_str(INPUT, Language::Rust).unwrap();
142 let focused = list.focus_around_line_index(5).unwrap();
143 focused.print_debug();
144 {
145 let blocks = focused.clone().focus.into_blocks();
146 for (i, block) in blocks.iter().enumerate() {
147 block.print_debug(&format!(" BLOCK {i}"));
148 }
149 }
150 let sorted_list = focused.sort();
151 sorted_list.print_debug(" SORTED ");
152 assert_eq!(sorted_list.to_string(), OUTPUT);
153}

Callers

nothing calls this directly

Calls 4

into_blocksMethod · 0.80
sortMethod · 0.80
print_debugMethod · 0.45

Tested by

no test coverage detected