()
| 9 | } |
| 10 | |
| 11 | fn main() { |
| 12 | let program = Program::compile("foo.a == foo.b").unwrap(); |
| 13 | let mut context = Context::default(); |
| 14 | |
| 15 | // MyStruct will be implicitly serialized into the CEL appropriate types |
| 16 | context |
| 17 | .add_variable("foo", MyStruct { a: 1, b: 1 }) |
| 18 | .unwrap(); |
| 19 | |
| 20 | let value = program.execute(&context).unwrap(); |
| 21 | assert_eq!(value, true.into()); |
| 22 | } |
nothing calls this directly
no test coverage detected