mirror of
https://github.com/CodeZeno/Claude-Code-Usage-Monitor.git
synced 2026-06-20 10:19:27 +08:00
docs: fix ETD safe-pace test to a genuinely safe case
This commit is contained in:
parent
e2d5298466
commit
e275646007
@ -41,9 +41,10 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn etd_none_when_on_safe_pace() {
|
||||
// 50% used, 1h elapsed of a 5h window (4h remaining).
|
||||
// Project ~1h more to full → total ~2h « 4h remaining → safe.
|
||||
assert_eq!(etd_secs(50.0, 4 * 3600, 5 * 3600), None);
|
||||
// 10% used, 1h elapsed of a 5h window (4h remaining): steady pace at 1h
|
||||
// is 20%, so 10% is UNDER pace → would not deplete before reset.
|
||||
// (50% in the first hour would be at-risk, not safe — see the invariant.)
|
||||
assert_eq!(etd_secs(10.0, 4 * 3600, 5 * 3600), None);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user