use lb::color; #[test] fn average_get() { { let avg = color::Average::new(); assert_eq!(avg.get(), None); } { let mut avg = color::Average::new(); avg.add(&color::Rgb::new(150, 30, 255)); avg.add(&color::Rgb::new(0, 60, 255)); avg.add(&color::Rgb::new(0, 90, 255)); assert_eq!(avg.get(), Some(color::Rgb::new(50, 60, 255))); } }