mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Fix quatree test; warning police
This commit is contained in:
parent
14fc16af2e
commit
c1638f8e27
2 changed files with 4 additions and 5 deletions
|
@ -750,13 +750,13 @@ pub fn test_resize() {
|
||||||
let mut q = Quadtree::new(6, 6, 1, None);
|
let mut q = Quadtree::new(6, 6, 1, None);
|
||||||
q.add_tile_pixel(0, 0, 1f32, T{a: 0});
|
q.add_tile_pixel(0, 0, 1f32, T{a: 0});
|
||||||
q.add_tile_pixel(5, 5, 1f32, T{a: 1});
|
q.add_tile_pixel(5, 5, 1f32, T{a: 1});
|
||||||
q.resize(8, 1);
|
q.bad_resize(8, 1);
|
||||||
assert!(q.root.size == 8.0);
|
assert!(q.root.size == 8.0);
|
||||||
q.resize(18, 1);
|
q.bad_resize(18, 1);
|
||||||
assert!(q.root.size == 32.0);
|
assert!(q.root.size == 32.0);
|
||||||
q.resize(8, 1);
|
q.bad_resize(8, 1);
|
||||||
assert!(q.root.size == 8.0);
|
assert!(q.root.size == 8.0);
|
||||||
q.resize(3, 1);
|
q.bad_resize(3, 1);
|
||||||
assert!(q.root.size == 4.0);
|
assert!(q.root.size == 4.0);
|
||||||
assert!(q.get_all_tiles().len() == 1);
|
assert!(q.get_all_tiles().len() == 1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,6 @@ use std::hashmap::{HashMap, HashSet};
|
||||||
use std::util::replace;
|
use std::util::replace;
|
||||||
use extra::url::Url;
|
use extra::url::Url;
|
||||||
use extra::future::{Future, from_value};
|
use extra::future::{Future, from_value};
|
||||||
use extra::url::Url;
|
|
||||||
|
|
||||||
/// Maintains the pipelines and navigation context and grants permission to composite
|
/// Maintains the pipelines and navigation context and grants permission to composite
|
||||||
pub struct Constellation {
|
pub struct Constellation {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue