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

Function test_file_add

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

Source from the content-addressed store, hash-verified

679
680 #[test]
681 fn test_file_add() {
682 let graph_op: GraphOp<Hash> = GraphOp::FileAdd {
683 add_name: test_new_vertex(),
684 add_inode: test_new_vertex(),
685 contents: Some(test_new_vertex()),
686 path: "README.md".to_string(),
687 encoding: Some(Encoding::Utf8),
688 };
689
690 assert!(graph_op.is_file_operation());
691 assert!(!graph_op.is_content_edit());
692 assert_eq!(graph_op.path(), Some("README.md"));
693 assert_eq!(graph_op.encoding(), Some(Encoding::Utf8));
694 assert_eq!(graph_op.type_name(), "FileAdd");
695 }
696
697 #[test]
698 fn test_file_del() {

Callers

nothing calls this directly

Calls 1

test_new_vertexFunction · 0.70

Tested by

no test coverage detected