()
| 697 | |
| 698 | #[test] |
| 699 | fn test_leaf_op_display() { |
| 700 | let insert_op = LeafOp::Insert { |
| 701 | after: None, |
| 702 | kind: TokenKind::Word, |
| 703 | content: b"test".to_vec(), |
| 704 | }; |
| 705 | let display = format!("{}", insert_op); |
| 706 | assert!(display.contains("insert")); |
| 707 | assert!(display.contains("Word")); |
| 708 | assert!(display.contains("START")); |
| 709 | assert!(display.contains("4 bytes")); |
| 710 | |
| 711 | let leaf_id = LeafId::new(NodeId::new(1), 0); |
| 712 | let delete_op = LeafOp::Delete { leaf: leaf_id }; |
| 713 | assert!(format!("{}", delete_op).contains("delete")); |
| 714 | |
| 715 | let replace_op = LeafOp::Replace { |
| 716 | leaf: leaf_id, |
| 717 | new_content: b"new".to_vec(), |
| 718 | }; |
| 719 | assert!(format!("{}", replace_op).contains("replace")); |
| 720 | |
| 721 | let restore_op = LeafOp::Restore { leaf: leaf_id }; |
| 722 | assert!(format!("{}", restore_op).contains("restore")); |
| 723 | } |
| 724 | |
| 725 | #[test] |
| 726 | fn test_leaf_op_display_with_after() { |
nothing calls this directly
no outgoing calls
no test coverage detected