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:658–675  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

656
657 #[test]
658 fn test_writer_vertex_buffer_workflow() {
659 let mut output = Vec::new();
660 let mut writer = Writer::new(&mut output);
661
662 // Write a simple span
663 let v = GraphNode::new(
664 NodeId::new(1),
665 ChangePosition::new(0),
666 ChangePosition::new(5),
667 );
668 let result: Result<(), std::io::Error> = writer.output_line(v, |buf| {
669 buf.copy_from_slice(b"hello");
670 Ok(())
671 });
672 result.unwrap();
673
674 assert_eq!(output, b"hello");
675 }
676
677 #[test]
678 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