resolve intake: a failed resolve still holds the interests it read
This commit is contained in:
parent
28f75112f6
commit
581b29b58f
1 changed files with 8 additions and 0 deletions
|
|
@ -244,3 +244,11 @@ fn interests_follow_what_the_held_trees_read() {
|
|||
assert_eq!(rig.interest_calls().last(), Some(&(false, one)));
|
||||
assert_eq!(rig.interest_calls().len(), 4);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_surface_that_fails_still_holds_the_interests_it_read() {
|
||||
let mut rig = Rig::new();
|
||||
let bad = surface("main", 1, vec![use_of("ghost-use", "ghost"), command_button("go", "undeclared")]);
|
||||
assert_eq!(codes(&rig.offer(&bad)), vec![Code::UnresolvedUse, Code::UndeclaredCommand]);
|
||||
assert_eq!(rig.interest_calls(), vec![(true, comp_address("ghost"))]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue