MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_writer_empty_vertex

Function test_writer_empty_vertex

atomic-core/src/output/traits.rs:1164–1178  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1162
1163 #[test]
1164 fn test_writer_empty_vertex() {
1165 let buf: Vec<u8> = Vec::new();
1166 let mut writer = Writer::new(buf);
1167
1168 let node = GraphNode {
1169 change: NodeId::new(1),
1170 start: ChangePosition::new(0),
1171 end: ChangePosition::new(0), // Empty span
1172 };
1173
1174 let result: Result<(), std::io::Error> = writer.output_line(node, |_buf| Ok(()));
1175 result.unwrap();
1176
1177 assert!(writer.into_inner().is_empty());
1178 }
1179
1180 #[test]
1181 fn test_writer_inner_mut() {

Callers

nothing calls this directly

Calls 2

output_lineMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected