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

Function test_operations_create

atomic-core/src/crdt/mod.rs:226–248  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

224
225 #[test]
226 fn test_operations_create() {
227 // File creation
228 let create_file = TrunkOp::Create {
229 path: "new.rs".to_string(),
230 encoding: Some(Encoding::Utf8),
231 };
232 assert!(create_file.is_create());
233
234 // Line insertion
235 let insert_line = BranchOp::Insert {
236 after: None,
237 content: vec![],
238 };
239 assert!(insert_line.is_insert());
240
241 // Token insertion
242 let insert_token = LeafOp::Insert {
243 after: None,
244 kind: TokenKind::Word,
245 content: b"hello".to_vec(),
246 };
247 assert!(insert_token.is_insert());
248 }
249
250 #[test]
251 fn test_id_ordering_for_conflict_resolution() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected