()
| 768 | #[cfg(feature = "chrono")] |
| 769 | #[test] |
| 770 | fn test_timestamp_variable() { |
| 771 | let mut context = Context::default(); |
| 772 | let ts: chrono::DateTime<chrono::FixedOffset> = |
| 773 | chrono::DateTime::parse_from_rfc3339("2023-05-29T00:00:00Z").unwrap(); |
| 774 | context |
| 775 | .add_variable("ts", crate::Value::Timestamp(ts)) |
| 776 | .unwrap(); |
| 777 | |
| 778 | let program = crate::Program::compile("ts == timestamp('2023-05-29T00:00:00Z')").unwrap(); |
| 779 | let result = program.execute(&context).unwrap(); |
| 780 | assert_eq!(result, true.into()); |
| 781 | } |
| 782 | |
| 783 | #[cfg(feature = "chrono")] |
| 784 | #[test] |
nothing calls this directly
no test coverage detected