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

Function test_writer_vertex_buffer_workflow

atomic-core/src/output/mod.rs:665–682  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

663
664 #[test]
665 fn test_writer_vertex_buffer_workflow() {
666 let mut output = Vec::new();
667 let mut writer = Writer::new(&mut output);
668
669 // Write a simple span
670 let v = GraphNode::new(
671 NodeId::new(1),
672 ChangePosition::new(0),
673 ChangePosition::new(5),
674 );
675 let result: Result<(), std::io::Error> = writer.output_line(v, |buf| {
676 buf.copy_from_slice(b"hello");
677 Ok(())
678 });
679 result.unwrap();
680
681 assert_eq!(output, b"hello");
682 }
683
684 #[test]
685 fn test_sink_discards_output() {

Callers

nothing calls this directly

Calls 2

output_lineMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected