#![cfg(feature = "host-tz")]
use dtrexp::{parse, Tz};
#[test]
fn covers_evaluates_in_a_host_supplied_zone() {
let tz = Tz::from_offset_fn("Host/Plus2", |_| 7_200);
let expr = parse("T0900:1800 E1:5").unwrap();
assert!(expr.covers_in(1_783_584_000_000, &tz));
assert!(!expr.covers_in(1_783_616_400_000, &tz));
}
#[test]
fn cadence_anchors_resolve_through_the_host_zone() {
let tz = Tz::from_offset_fn("Host/Plus2", |_| 7_200);
let expr = parse("20260707/2H/1H").unwrap();
assert!(expr.covers_in(1_783_548_000_000, &tz));
assert!(!expr.covers_in(1_783_551_600_000, &tz));
}