diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/display/color_manager.rs | 11 | ||||
-rw-r--r-- | src/display/virtual_curses.rs | 7 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/display/color_manager.rs b/src/display/color_manager.rs index 279255d..1357353 100644 --- a/src/display/color_manager.rs +++ b/src/display/color_manager.rs @@ -390,12 +390,11 @@ mod tests { blue: 220, }, ); - let trace = curses.get_function_trace(); - let expected_trace = vec![ - build_trace!("init_color", "16", "392", "588", "784"), - build_trace!("init_color", "17", "470", "666", "862"), - ]; - compare_trace(&trace, &expected_trace); + + let colors = curses.get_colors(); + + assert_eq!(colors[16], (392, 588, 784)); + assert_eq!(colors[17], (470, 666, 862)); } #[test] diff --git a/src/display/virtual_curses.rs b/src/display/virtual_curses.rs index 908d136..029747c 100644 --- a/src/display/virtual_curses.rs +++ b/src/display/virtual_curses.rs @@ -49,6 +49,10 @@ impl Curses { self.function_call_trace.borrow().clone() } + pub(crate) const fn get_colors(&self) -> &[(i16, i16, i16); 255] { + &self.colors + } + pub(crate) fn push_input(&self, input: Input) { self.input.borrow_mut().insert(0, input); } @@ -58,9 +62,6 @@ impl Curses { } pub(super) fn init_color(&mut self, index: i16, red: i16, green: i16, blue: i16) { - self.function_call_trace - .borrow_mut() - .push(build_trace!("init_color", index, red, green, blue)); self.colors[index as usize] = (red, green, blue); } |