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

Function test_file_add

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

Source from the content-addressed store, hash-verified

903
904 #[test]
905 fn test_file_add() {
906 let graph_op: GraphOp<Hash> = GraphOp::FileAdd {
907 add_name: test_new_vertex(),
908 add_inode: test_new_vertex(),
909 contents: Some(test_new_vertex()),
910 path: "README.md".to_string(),
911 encoding: Some(Encoding::Utf8),
912 };
913
914 assert!(graph_op.is_file_operation());
915 assert!(!graph_op.is_content_edit());
916 assert_eq!(graph_op.path(), Some("README.md"));
917 assert_eq!(graph_op.encoding(), Some(Encoding::Utf8));
918 assert_eq!(graph_op.type_name(), "FileAdd");
919 }
920
921 #[test]
922 fn test_file_del() {

Callers

nothing calls this directly

Calls 1

test_new_vertexFunction · 0.70

Tested by

no test coverage detected