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

Function test_detect_context_clone

atomic-core/src/record/context.rs:998–1010  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

996
997 #[test]
998 fn test_detect_context_clone() {
999 let txn = MockTxn;
1000 let working_copy = Memory::new();
1001 let change_store = MemoryChangeStore::new();
1002
1003 let ctx = DetectContext::new(&txn, &working_copy, &change_store)
1004 .with_options(DetectOptions::new().with_prefix("test/"));
1005
1006 let cloned = ctx.clone();
1007
1008 assert_eq!(cloned.prefix(), "test/");
1009 assert_eq!(cloned.algorithm(), ctx.algorithm());
1010 }
1011
1012 // RecordContext Tests
1013

Callers

nothing calls this directly

Calls 3

with_optionsMethod · 0.45
with_prefixMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected