Non regression test for 0 division issue in flight phases switch

This commit is contained in:
bsongis
2011-12-12 18:53:36 +00:00
parent 8a2e035dc9
commit 423ca57f10
4 changed files with 39 additions and 11 deletions
+10 -1
View File
@@ -257,8 +257,17 @@ TEST(getSwitch, nullSW) {
EXPECT_EQ(getSwitch(0, 0), false);
}
TEST(phases, nullFadeOut_posFadeIn) {
memset(&g_model, 0, sizeof(g_model));
g_model.phaseData[1].swtch = DSW_ID1;
g_model.phaseData[1].fadeIn = 15;
perMain();
setSwitch(DSW_ID1);
perMain();
}
int main(int argc, char **argv) {
InitEepromThread();
StartEepromThread(NULL);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}