From 30f67573f4a772fcb229f662a9d28df781753b97 Mon Sep 17 00:00:00 2001 From: Zwelf Date: Thu, 12 May 2022 16:03:17 +0200 Subject: [PATCH] Output corresponding array to EXPECTED in teehistorian test cases --- src/test/teehistorian.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/test/teehistorian.cpp b/src/test/teehistorian.cpp index 6c2e0c400..b35b5b5b1 100644 --- a/src/test/teehistorian.cpp +++ b/src/test/teehistorian.cpp @@ -144,6 +144,27 @@ protected: } ASSERT_FALSE(m_Buffer.Error()); + + printf("pOutput = {"); + int Start = 0; // skip over header; + for(int i = 0; i < m_Buffer.Size(); i++) + { + if(Start == 0) + { + if(m_Buffer.Data()[i] == 0) + Start = i + 1; + continue; + } + if(Start + i != 0) + { + if((Start + i) % 10 == 0) + printf("\n\t"); + else + printf(", "); + } + printf("0x%.2x", m_Buffer.Data()[i]); + } + printf("\n}\n"); ASSERT_EQ(m_Buffer.Size(), OutputSize); ASSERT_TRUE(mem_comp(m_Buffer.Data(), pOutput, OutputSize) == 0); }