Taking 1 step in a deep context is working!
This commit is contained in:
parent
d89d3d9f3c
commit
f62d50df95
@ -151,7 +151,19 @@ mod tests {
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect();
|
||||
let deep_context: HashMap<&str, HashMap<&str, &str>> = [
|
||||
("cat", [("food", "meat")].iter().cloned().collect()),
|
||||
("dog", [("food", "meat")].iter().cloned().collect()),
|
||||
("tiger", [("food", "people")].iter().cloned().collect()),
|
||||
]
|
||||
.iter()
|
||||
.cloned()
|
||||
.collect();
|
||||
assert_eq!(do_the_walk(&context, "cat"), &"kitty");
|
||||
assert_eq!(do_the_walk(&number_context, "tiger"), &3);
|
||||
assert_eq!(
|
||||
do_the_walk(&deep_context, "tiger"),
|
||||
&[("food", "people")].iter().cloned().collect()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user