use std::borrow::Cow;
use std::path::Path;
use interner::global::{GlobalPath, PathPool, StaticPooledPath};
static PATH_POOL: PathPool = PathPool::new();
static STATIC_PATH: StaticPooledPath = PATH_POOL.get_static_with(|| Cow::Borrowed(Path::new("a")));
fn main() {
STATIC_PATH.get();
let a_again = PATH_POOL.get(Path::new("a"));
assert!(GlobalPath::ptr_eq(&*STATIC_PATH, &a_again));
drop(a_again);
let pooled: Vec<GlobalPath> = PATH_POOL.pooled();
assert_eq!(pooled.len(), 1);
assert_eq!(pooled[0], Path::new("a"));
}
#[test]
fn runs() {
main();
}