#[test]
fn core_reexports_are_wired() {
let content = adk_rust::Content::new("user").with_text("hi");
assert_eq!(content.role, "user");
}
#[cfg(feature = "code-tools")]
mod code_tools {
use adk_rust::Tool;
#[test]
fn code_execution_tools_are_reachable() {
assert_eq!(adk_rust::tool::PythonCodeTool::new().name(), "python_code");
assert_eq!(adk_rust::tool::JavaScriptCodeTool::new().name(), "javascript_code");
assert_eq!(adk_rust::tool::MontyPythonCodeTool::new().name(), "monty_python_code");
assert_eq!(adk_rust::tool::FrontendCodeTool::react().name(), "frontend_code");
}
}
#[cfg(feature = "code-embedded-js")]
mod code_embedded_js {
use adk_rust::code::{CodeExecutor, EmbeddedJsExecutor, ExecutionLanguage};
#[test]
fn embedded_js_executor_is_reachable() {
let executor = EmbeddedJsExecutor::new();
assert!(executor.supports_language(&ExecutionLanguage::JavaScript));
}
}
#[cfg(feature = "code-embedded-python")]
mod code_embedded_python {
use adk_rust::code::{CodeExecutor, ExecutionLanguage, MontyExecutorBuilder};
#[test]
fn monty_executors_are_reachable() {
let executor = MontyExecutorBuilder::new().build_one_shot().unwrap();
assert!(executor.supports_language(&ExecutionLanguage::Python));
let repl = MontyExecutorBuilder::new().build_repl().unwrap();
assert!(repl.supports_language(&ExecutionLanguage::Python));
}
}
#[cfg(feature = "code-docker")]
mod code_docker {
#[test]
fn docker_executor_type_is_reachable() {
fn nameable<T>() {}
nameable::<adk_rust::code::DockerExecutor>();
}
}
#[cfg(feature = "codeact")]
mod codeact {
#[test]
fn codeact_module_is_reachable() {
assert!(!adk_rust::agent::codeact::CODEACT_SYSTEM_PROMPT.is_empty());
}
}
#[cfg(feature = "codeact-monty")]
mod codeact_monty {
use adk_rust::agent::codeact::CodeRuntime;
use adk_rust::codeact_monty::MontyRuntime;
#[test]
fn monty_runtime_is_reachable() {
let runtime = MontyRuntime::new();
assert!(runtime.capabilities().supports_suspension);
}
}