// no-cycle.el — NoCycleCalendar's cycle_phase returns NaN sentinel.
// Detection via float_to_str — NaN renders as "nan" under %g.

fn run_test() -> Int {
    let cal: Calendar = no_cycle_calendar()
    let i: Instant = unix_seconds(1000000000)
    let ct: CalendarTime = in_calendar(i, cal)
    let p: Float = cal_cycle_phase(ct)
    let s: String = float_to_str(p)
    if str_eq(s, "nan") {
        return 1
    }
    return 0
}

fn main() -> Void {
    println(int_to_str(run_test()))
}
