()
| 722 | |
| 723 | #[test] |
| 724 | fn test_edit() { |
| 725 | let graph_op: GraphOp<Hash> = GraphOp::Edit { |
| 726 | change: Atom::Insertion(test_new_vertex()), |
| 727 | local: Local::new("src/lib.rs", 42), |
| 728 | encoding: Some(Encoding::Utf8), |
| 729 | }; |
| 730 | |
| 731 | assert!(graph_op.is_content_edit()); |
| 732 | assert!(!graph_op.is_file_operation()); |
| 733 | assert_eq!(graph_op.path(), Some("src/lib.rs")); |
| 734 | assert_eq!(graph_op.line(), Some(42)); |
| 735 | assert_eq!(graph_op.local().unwrap().line, 42); |
| 736 | } |
| 737 | |
| 738 | #[test] |
| 739 | fn test_replacement() { |
nothing calls this directly
no test coverage detected