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

Function test_writer_empty_vertex

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

Source from the content-addressed store, hash-verified

1141
1142 #[test]
1143 fn test_writer_empty_vertex() {
1144 let buf: Vec<u8> = Vec::new();
1145 let mut writer = Writer::new(buf);
1146
1147 let node = GraphNode {
1148 change: NodeId::new(1),
1149 start: ChangePosition::new(0),
1150 end: ChangePosition::new(0), // Empty span
1151 };
1152
1153 let result: Result<(), std::io::Error> = writer.output_line(node, |_buf| Ok(()));
1154 result.unwrap();
1155
1156 assert!(writer.into_inner().is_empty());
1157 }
1158
1159 #[test]
1160 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