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

Function test_edit

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

InsertionClass · 0.85
test_new_vertexFunction · 0.70

Tested by

no test coverage detected