MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_edit

Function test_edit

atomic-core/src/change/graph_op.rs:949–961  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 2

InsertionClass · 0.85
test_new_vertexFunction · 0.70

Tested by

no test coverage detected