Lines Matching refs:it

265         let it = InodeTable::from_zip(&mut zip.unwrap());  in setup()  localVariable
266 assert!(it.is_ok()); in setup()
267 it.unwrap() in setup()
270 fn check_dir(it: &InodeTable, parent: Inode, name: &str) -> Inode { in check_dir()
272 let inode = it.find(parent, &name); in check_dir()
275 let inode_data = it.get(inode); in check_dir()
283 fn check_file<'a>(it: &'a InodeTable, parent: Inode, name: &str) -> &'a InodeData { in check_file()
285 let inode = it.find(parent, &name); in check_file()
288 let inode_data = it.get(inode); in check_file()
297 let it = setup(|_| {}); in empty_zip_has_two_inodes() localVariable
298 assert_eq!(2, it.table.len()); in empty_zip_has_two_inodes()
299 assert!(it.get(INVALID).is_none()); in empty_zip_has_two_inodes()
300 assert!(it.get(ROOT).is_some()); in empty_zip_has_two_inodes()
305 let it = setup(|zip| { in one_file() localVariable
309 let inode_data = check_file(&it, ROOT, "foo"); in one_file()
315 let it = setup(|zip| { in one_dir() localVariable
318 let inode = check_dir(&it, ROOT, "foo"); in one_dir()
320 assert_eq!(0, it.get(inode).unwrap().get_directory().unwrap().len()); in one_dir()
325 let it = setup(|zip| { in one_file_in_subdirs() localVariable
330 assert_eq!(6, it.table.len()); in one_file_in_subdirs()
331 let a = check_dir(&it, ROOT, "a"); in one_file_in_subdirs()
332 let b = check_dir(&it, a, "b"); in one_file_in_subdirs()
333 let c = check_dir(&it, b, "c"); in one_file_in_subdirs()
334 let d = check_file(&it, c, "d"); in one_file_in_subdirs()
356 let it = setup(|zip| { in complex_hierarchy() localVariable
374 assert_eq!(16, it.table.len()); // 8 files, 6 dirs, and 2 (for root and the invalid inode) in complex_hierarchy()
375 let a = check_dir(&it, ROOT, "a"); in complex_hierarchy()
376 let _b1 = check_dir(&it, a, "b1"); in complex_hierarchy()
377 let b2 = check_dir(&it, a, "b2"); in complex_hierarchy()
378 let _c1 = check_file(&it, b2, "c1"); in complex_hierarchy()
380 let c2 = check_dir(&it, b2, "c2"); in complex_hierarchy()
381 let _d1 = check_file(&it, c2, "d1"); in complex_hierarchy()
382 let _d2 = check_file(&it, c2, "d3"); in complex_hierarchy()
383 let _d3 = check_file(&it, c2, "d3"); in complex_hierarchy()
385 let x = check_dir(&it, ROOT, "x"); in complex_hierarchy()
386 let _y1 = check_file(&it, x, "y1"); in complex_hierarchy()
387 let _y2 = check_file(&it, x, "y2"); in complex_hierarchy()
388 let _y3 = check_dir(&it, x, "y3"); in complex_hierarchy()
390 let _foo = check_file(&it, ROOT, "foo"); in complex_hierarchy()
391 let _bar = check_file(&it, ROOT, "bar"); in complex_hierarchy()
396 let it = setup(|zip| { in file_size() localVariable
410 let f = check_file(&it, ROOT, "empty"); in file_size()
413 let f = check_file(&it, ROOT, "10bytes"); in file_size()
416 let f = check_file(&it, ROOT, "1234bytes"); in file_size()
419 let f = check_file(&it, ROOT, "2^20bytes"); in file_size()
440 let it = InodeTable::from_zip(&mut zip.unwrap()); in rejects_invalid_paths() localVariable
441 assert!(it.is_err()); in rejects_invalid_paths()