From 1fb5a7903bb44d44e298959d2637d858b2ea8e38 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 23 Jun 2024 17:07:22 -0700 Subject: document new AnsiDisplaySink, add more -arch tests for sinks --- src/testkit/display.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/testkit') diff --git a/src/testkit/display.rs b/src/testkit/display.rs index 3cffd49..3cef59c 100644 --- a/src/testkit/display.rs +++ b/src/testkit/display.rs @@ -147,6 +147,18 @@ pub struct DisplaySinkWriteComparator<'sinks, T: DisplaySink, U: DisplaySink> { } impl<'sinks, T: DisplaySink, U: DisplaySink> DisplaySinkWriteComparator<'sinks, T, U> { + pub fn new( + t: &'sinks mut T, t_check: fn(&T) -> &str, + u: &'sinks mut U, u_check: fn(&U) -> &str + ) -> Self { + Self { + sink1: t, + sink1_check: t_check, + sink2: u, + sink2_check: u_check, + } + } + fn compare_sinks(&self) { let sink1_text = (self.sink1_check)(self.sink1); let sink2_text = (self.sink2_check)(self.sink2); -- cgit v1.1