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

Function test_detect_context_clone

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

Source from the content-addressed store, hash-verified

981
982 #[test]
983 fn test_detect_context_clone() {
984 let txn = MockTxn;
985 let working_copy = Memory::new();
986 let change_store = MemoryChangeStore::new();
987
988 let ctx = DetectContext::new(&txn, &working_copy, &change_store)
989 .with_options(DetectOptions::new().with_prefix("test/"));
990
991 let cloned = ctx.clone();
992
993 assert_eq!(cloned.prefix(), "test/");
994 assert_eq!(cloned.algorithm(), ctx.algorithm());
995 }
996
997 // RecordContext Tests
998

Callers

nothing calls this directly

Calls 3

with_optionsMethod · 0.45
with_prefixMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected