MCPcopy Index your code
hub / github.com/endbasic/endbasic / tester_with

Function tester_with

std/src/help.rs:724–741  ·  view source on GitHub ↗
(callables: Vec<Rc<dyn Callable>>)

Source from the content-addressed store, hash-verified

722 }
723
724 fn tester_with(callables: Vec<Rc<dyn Callable>>) -> Tester {
725 let metadata = Rc::new(RefCell::new(HashMap::default()));
726 let mut tester = Tester::empty();
727 for callable in callables {
728 metadata
729 .borrow_mut()
730 .insert(SymbolKey::from(callable.metadata().name()), callable.metadata());
731 tester = tester.add_callable(callable);
732 }
733
734 let console = tester.get_console();
735 let help_probe =
736 HelpCommand::new(Rc::new(RefCell::new(HashMap::default())), console.clone(), None);
737 metadata
738 .borrow_mut()
739 .insert(SymbolKey::from(help_probe.metadata().name()), help_probe.metadata());
740 tester.add_callable(HelpCommand::new(metadata, console, None))
741 }
742
743 fn tester() -> Tester {
744 tester_with(vec![])

Callers 8

testerFunction · 0.85
test_help_eval_argFunction · 0.85
test_help_prefix_searchFunction · 0.85
test_help_errorsFunction · 0.85

Calls 5

insertMethod · 0.45
nameMethod · 0.45
metadataMethod · 0.45
add_callableMethod · 0.45
get_consoleMethod · 0.45

Tested by 6

test_help_eval_argFunction · 0.68
test_help_prefix_searchFunction · 0.68
test_help_errorsFunction · 0.68