One proxy, and a macro instead of a shared test module
`Proxy` is the task queue as well as the way an application sends its own events, so `ProxyQueue` is gone. `schedule_redraw` becomes `request_redraw_if_needed`, which says what the comment beside it was saying. `assert_corners!` replaces the region helper, so `tests/common` goes with it, and the scroll test now states both corners rather than one number.
This commit is contained in:
1 parent
3a74a04a5b
commit
7eb2b85425
5 files changed
+33
-37
No files matched your search
+5
-8
@@ -1,9 +1,6 @@
|
||||
//! Where a frame puts things, with no window to put them in.
|
||||
|
||||
mod common;
|
||||
|
||||
use common::corners;
|
||||
use iris::harness::Harness;
|
||||
use iris::harness::{Harness, assert_corners};
|
||||
use iris::prelude::*;
|
||||
|
||||
/// A fixed 100 wide, and the rest of the 400 to its neighbour.
|
||||
@@ -19,8 +16,8 @@ fn a_span_gives_each_child_the_width_it_asked_for() {
|
||||
let mut h = Harness::new((400, 200));
|
||||
let (left, right) = two_rects(&mut h);
|
||||
|
||||
assert_eq!(corners(&h, &left), (0.0, 0.0, 100.0, 200.0));
|
||||
assert_eq!(corners(&h, &right), (100.0, 0.0, 400.0, 200.0));
|
||||
assert_corners!(h, left, (0, 0), (100, 200));
|
||||
assert_corners!(h, right, (100, 0), (400, 200));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -32,6 +29,6 @@ fn resizing_relays_out_against_the_new_output() {
|
||||
assert!(h.needs_redraw());
|
||||
h.frame();
|
||||
|
||||
assert_eq!(corners(&h, &left), (0.0, 0.0, 100.0, 100.0));
|
||||
assert_eq!(corners(&h, &right), (100.0, 0.0, 800.0, 100.0));
|
||||
assert_corners!(h, left, (0, 0), (100, 100));
|
||||
assert_corners!(h, right, (100, 0), (800, 100));
|
||||
}
|
||||
Reference in new issue
Block a user