()
| 630 | |
| 631 | #[test] |
| 632 | fn test_leaf_op_insert() { |
| 633 | let op = LeafOp::Insert { |
| 634 | after: None, |
| 635 | kind: TokenKind::Word, |
| 636 | content: b"hello".to_vec(), |
| 637 | }; |
| 638 | assert!(op.is_insert()); |
| 639 | assert!(!op.is_delete()); |
| 640 | assert!(op.leaf_id().is_none()); |
| 641 | assert_eq!(op.op_type(), "insert"); |
| 642 | assert_eq!(op.insert_after(), Some(None)); |
| 643 | assert_eq!(op.content(), Some(&b"hello"[..])); |
| 644 | assert_eq!(op.token_kind(), Some(TokenKind::Word)); |
| 645 | assert_eq!(op.content_len(), 5); |
| 646 | } |
| 647 | |
| 648 | #[test] |
| 649 | fn test_leaf_op_insert_after() { |
nothing calls this directly
no outgoing calls
no test coverage detected