Google tests again ok (missing initialization)

This commit is contained in:
bsongis
2015-03-11 06:50:37 +01:00
parent a61a7228da
commit 9e3ef837bb
2 changed files with 9 additions and 13 deletions
+7
View File
@@ -15,6 +15,13 @@ extern uint16_t anaInValues[NUM_STICKS+NUM_POTS];
void doMixerCalculations();
#if defined(PCBTARANIS)
#define RADIO_RESET() \
g_eeGeneral.switchConfig = 0x00007bff
#else
#define RADIO_RESET()
#endif
inline void MODEL_RESET()
{
memset(&g_model, 0, sizeof(g_model));
+2 -13
View File
@@ -34,19 +34,7 @@
*
*/
#include <math.h>
#include <gtest/gtest.h>
#define SWAP_DEFINED
#include "opentx.h"
#define MODEL_RESET() \
memset(&g_model, 0, sizeof(g_model)); \
extern uint8_t s_mixer_first_run_done; \
s_mixer_first_run_done = false; \
lastFlightMode = 255;
extern void MIXER_RESET();
#include "gtests.h"
#if !defined(PCBTARANIS)
TEST(getSwitch, undefCSW)
@@ -76,6 +64,7 @@ TEST(getSwitch, circularCSW)
#if defined(PCBTARANIS)
TEST(getSwitch, OldTypeStickyCSW)
{
RADIO_RESET();
MODEL_RESET();
MIXER_RESET();
g_model.logicalSw[0] = { LS_FUNC_AND, SWSRC_SA0, 0, 0, };