persona drain tests: a record that holds an unknown send and a send still owed owes it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ccecac90e0
commit
cd5d1d51f6
1 changed files with 3 additions and 2 deletions
|
|
@ -371,10 +371,11 @@ fn t_l3_one_predicate_says_a_record_owes_a_send_for_the_poll_the_ack_and_the_dra
|
|||
json!({ "held": ["$empty"], "owed": [] }),
|
||||
json!({ "held": ["$settled"], "posted": [] }),
|
||||
json!({ "held": ["$owing"], "owed": owed }),
|
||||
json!({ "held": ["$sibling"], "owed": owed, "unknown_sends": [{ "room": "!a", "text": "one" }] }),
|
||||
];
|
||||
let each: Vec<bool> = records.iter().map(owes_send).collect();
|
||||
assert_eq!(each, [false, false, false, true]);
|
||||
assert_eq!(each, [false, false, false, true, true], "a record that holds an unknown send and a send still owed owes it");
|
||||
assert_eq!(owes(&records), each.contains(&true));
|
||||
assert_eq!(owing(&records), BTreeSet::from(["$owing"]));
|
||||
assert_eq!(owing(&records), BTreeSet::from(["$owing", "$sibling"]));
|
||||
assert!(!owes(&records[..3]) && owing(&records[..3]).is_empty());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue