Re #1458 - the cast is back, but cast to different type depending on platform. Gtest modernized.

This commit is contained in:
Damjan Adamic
2014-07-06 09:11:29 +02:00
parent ed094f89e8
commit 7130e48089
3 changed files with 10 additions and 20 deletions
+4 -12
View File
@@ -47,6 +47,8 @@
#define CHANNEL_MAX (1024*256)
void doMixerCalculations();
bool checkScreenshot(QString test);
#define MODEL_RESET() \
memset(&g_model, 0, sizeof(g_model)); \
@@ -136,19 +138,9 @@ TEST(Trims, CopySticksToOffset)
TEST(outdezNAtt, test_unsigned)
{
uint8_t refBuf[sizeof(displayBuf)];
memset(displayBuf, 0, sizeof(displayBuf));
lcd_putc(0*FWNUM, 0, '6');
lcd_putc(1*FWNUM, 0, '5');
lcd_putc(2*FWNUM, 0, '5');
lcd_putc(3*FWNUM, 0, '3');
lcd_putc(4*FWNUM, 0, '0');
memcpy(refBuf, displayBuf, sizeof(displayBuf));
memset(displayBuf, 0, sizeof(displayBuf));
lcd_clear();
lcd_outdezNAtt(0, 0, 65530, LEFT|UNSIGN);
EXPECT_EQ(memcmp(refBuf, displayBuf, sizeof(displayBuf)), 0) << "Unsigned numbers will be bad displayed";
EXPECT_TRUE(checkScreenshot("unsigned")) << "Unsigned numbers will be bad displayed";
}
#if !defined(PCBSKY9X)