From 4ed02053d8d53b7c86ebede7d85cb10b6d90a898 Mon Sep 17 00:00:00 2001 From: Ryan Kennedy Date: Wed, 18 Mar 2020 20:47:29 -0500 Subject: [PATCH] Split up tests --- src/colors.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/colors.rs b/src/colors.rs index 33e5f89..236c6dc 100644 --- a/src/colors.rs +++ b/src/colors.rs @@ -124,8 +124,13 @@ mod test { fn test_set_foreground() { let mut color = TextModeColor::new(Color16Bit::Yellow, Color16Bit::Black); color.set_foreground(Color16Bit::Red); - color.set_background(Color16Bit::DarkGrey); assert_eq!(color.0 & 0x0F, Color16Bit::Red as u8); + } + + #[test] + fn test_set_background() { + let mut color = TextModeColor::new(Color16Bit::Yellow, Color16Bit::Black); + color.set_background(Color16Bit::DarkGrey); assert_eq!(color.0 >> 4, Color16Bit::DarkGrey as u8); } }