Repository navigation
feat(math): add math cbrt builtin - #18481
Conversation
|
There should be some search terms in this command like |
Just found that trying "root" command only suggests |
|
unrelated to the pr, but regarding this #[test]
fn no_search_term_duplicates() {
let ctx = add_command_context(EngineState::new());
let decls = ctx.get_decls_sorted(true);
let mut failures = Vec::new();
for (name_bytes, decl_id) in decls {
let cmd = ctx.get_decl(decl_id);
let cmd_name = String::from_utf8_lossy(&name_bytes);
let search_terms = cmd.search_terms();
let category = cmd.signature().category;
for search_term in search_terms {
if cmd_name.contains(search_term) {
failures.push(format!("{cmd_name} ({category:?}): Search term \"{search_term}\" is substring of command name \"{cmd_name}\""));
}
}
}
assert!(
failures.is_empty(),
"Duplication in search terms:\n{}",
failures.join("\n")
);
}the test is likely doing not what it's supposed to do |
|
I've opened another PR for this. This one will fail tests until that one is merged anyway |
The search terms are meant to be used by
Ya, that's what it's supposed to do but it should check for duplicates in the list of search terms too. |
|
Okay, I'll remove cbrt from search terms then |
|
Thanks |
Description
literally the title.
User-facing changes (Release notes)
Added
math cbrt(cube root) function.