()
| 465 | |
| 466 | #[test] |
| 467 | fn test_has() { |
| 468 | let tests = vec![ |
| 469 | ("map has", "has(foo.bar) == true"), |
| 470 | ("map not has", "has(foo.baz) == false"), |
| 471 | ]; |
| 472 | |
| 473 | for (name, script) in tests { |
| 474 | let mut ctx = Context::default(); |
| 475 | ctx.add_variable_from_value("foo", std::collections::HashMap::from([("bar", 1)])); |
| 476 | assert_eq!(test_script(script, Some(ctx)), Ok(true.into()), "{name}"); |
| 477 | } |
| 478 | } |
| 479 | |
| 480 | #[test] |
| 481 | fn test_map() { |
nothing calls this directly
no test coverage detected