test: added more unit tests for the memory system

This commit is contained in:
2026-06-10 18:44:32 -06:00
parent 19d2340489
commit a10b23dbc1
3 changed files with 179 additions and 0 deletions
+15
View File
@@ -3277,6 +3277,21 @@ mod tests {
);
}
#[test]
fn should_register_memory_tools_false_when_function_calling_off() {
let mut ctx = create_test_ctx();
ctx.update_app_config(|app| {
app.memory = Some(true);
app.function_calling_support = false;
});
assert!(
!ctx.should_register_memory_tools(),
"memory tools must require function_calling_support even when memory itself would otherwise be enabled"
);
}
#[test]
fn use_role_obj_sets_role() {
let mut ctx = create_test_ctx();