()
| 947 | |
| 948 | #[test] |
| 949 | fn test_edit() { |
| 950 | let graph_op: GraphOp<Hash> = GraphOp::Edit { |
| 951 | change: Atom::Insertion(test_new_vertex()), |
| 952 | local: Local::new("src/lib.rs", 42), |
| 953 | encoding: Some(Encoding::Utf8), |
| 954 | }; |
| 955 | |
| 956 | assert!(graph_op.is_content_edit()); |
| 957 | assert!(!graph_op.is_file_operation()); |
| 958 | assert_eq!(graph_op.path(), Some("src/lib.rs")); |
| 959 | assert_eq!(graph_op.line(), Some(42)); |
| 960 | assert_eq!(graph_op.local().unwrap().line, 42); |
| 961 | } |
| 962 | |
| 963 | #[test] |
| 964 | fn test_replacement() { |
nothing calls this directly
no test coverage detected