MCPcopy Create free account
hub / github.com/cel-rust/cel-rust / test_script

Function test_script

cel/src/lib.rs:231–237  ·  view source on GitHub ↗

Tests the provided script and returns the result. An optional context can be provided.

(script: &str, ctx: Option<Context>)

Source from the content-addressed store, hash-verified

229
230 /// Tests the provided script and returns the result. An optional context can be provided.
231 pub(crate) fn test_script(script: &str, ctx: Option<Context>) -> ResolveResult {
232 let program = match Program::compile(script) {
233 Ok(p) => p,
234 Err(e) => panic!("{}", e),
235 };
236 program.execute(&ctx.unwrap_or_default())
237 }
238
239 #[test]
240 fn parse() {

Callers 3

test_execution_errorsFunction · 0.85
test_maxFunction · 0.85
test_minFunction · 0.85

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected