|
@@ -329,6 +329,7 @@ mod tests {
|
|
|
};
|
|
|
|
|
|
use super::EventRoot;
|
|
|
+ use super::ChannelMetadata;
|
|
|
|
|
|
struct Receiver {
|
|
|
int_count: Cell<usize>,
|
|
@@ -364,7 +365,7 @@ mod tests {
|
|
|
|
|
|
#[test]
|
|
|
fn simple_fire() {
|
|
|
- let mut root = EventRoot::default();
|
|
|
+ let root = EventRoot::default();
|
|
|
|
|
|
root.create_channel::<IntChannel>();
|
|
|
|
|
@@ -376,13 +377,13 @@ mod tests {
|
|
|
.sub_ref(&recv, Receiver::receive_i32);
|
|
|
root.channel::<IntChannel>().queue(0i32);
|
|
|
assert_eq!(recv.int_count.get(), 0);
|
|
|
- root.channel::<IntChannel>().do_fire_all();
|
|
|
+ root.channel::<IntChannel>().fire_all();
|
|
|
assert_eq!(recv.int_count.get(), 1);
|
|
|
}
|
|
|
|
|
|
#[test]
|
|
|
fn priority_fire() {
|
|
|
- let mut root = EventRoot::default();
|
|
|
+ let root = EventRoot::default();
|
|
|
|
|
|
root.create_channel::<IntPriorityChannel>();
|
|
|
|
|
@@ -418,7 +419,7 @@ mod tests {
|
|
|
);
|
|
|
root.channel::<IntPriorityChannel>().queue(0i32);
|
|
|
assert_eq!(order.borrow().deref(), &vec![]);
|
|
|
- root.channel::<IntPriorityChannel>().do_fire_all();
|
|
|
+ root.channel::<IntPriorityChannel>().fire_all();
|
|
|
assert_eq!(order.borrow().deref(), &vec![1, 2, 3]);
|
|
|
}
|
|
|
}
|