mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Add Color::from_256colors test
This commit is contained in:
parent
6f072ac894
commit
800470e22c
@ -184,3 +184,18 @@ fn load_hex(s: &str) -> u16 {
|
||||
|
||||
sum as u16
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_256_colors() {
|
||||
// Make sure Color::from_256colors never panics
|
||||
use super::Color;
|
||||
|
||||
// TODO: use inclusive range when it gets stable
|
||||
for i in 0..256u16 {
|
||||
Color::from_256colors(i as u8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user