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

Function test_detect_context_clone

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

with_optionsMethod · 0.45
with_prefixMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected