()
| 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() { |
nothing calls this directly
no test coverage detected