stub for companion storage tests

This commit is contained in:
Raphael Coeffic
2019-08-23 08:32:43 +02:00
parent a5959b55a2
commit 84aeed8914
7 changed files with 296 additions and 0 deletions
+96
View File
@@ -0,0 +1,96 @@
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _GTESTS_H_
#define _GTESTS_H_
#include <QtCore/QString>
#include <math.h>
#include <gtest/gtest.h>
// #if defined(PCBTARANIS) || defined(PCBHORUS)
// #define RADIO_RESET() \
// g_eeGeneral.switchConfig = 0x00007bff
// #else
// #define RADIO_RESET()
// #endif
// inline void SYSTEM_RESET()
// {
// #if defined(EEPROM)
// memset(modelHeaders, 0, sizeof(modelHeaders));
// #endif
// generalDefault();
// g_eeGeneral.templateSetup = 0;
// for (int i=0; i<NUM_SWITCHES; i++) {
// simuSetSwitch(i, -1);
// }
// }
// inline void MODEL_RESET()
// {
// memset(&g_model, 0, sizeof(g_model));
// memset(&anaInValues, 0, sizeof(anaInValues));
// extern uint8_t s_mixer_first_run_done;
// s_mixer_first_run_done = false;
// lastFlightMode = 255;
// }
// inline void MIXER_RESET()
// {
// memset(channelOutputs, 0, sizeof(channelOutputs));
// memset(chans, 0, sizeof(chans));
// memset(ex_chans, 0, sizeof(ex_chans));
// memset(act, 0, sizeof(act));
// memset(swOn, 0, sizeof(swOn));
// mixerCurrentFlightMode = lastFlightMode = 0;
// lastAct = 0;
// logicalSwitchesReset();
// }
// inline void TELEMETRY_RESET()
// {
// telemetryData.clear();
// telemetryData.rssi.set(100);
// for (int i=0; i<MAX_TELEMETRY_SENSORS; i++) {
// telemetryItems[i].clear();
// }
// memclear(g_model.telemetrySensors, sizeof(g_model.telemetrySensors));
// }
class OpenTxTest : public testing::Test
{
protected: // You should make the members protected s.t. they can be
// accessed from sub-classes.
// virtual void SetUp() will be called before each test is run. You
// should define it if you need to initialize the varaibles.
// Otherwise, this can be skipped.
virtual void SetUp()
{
// SYSTEM_RESET();
// MODEL_RESET();
// MIXER_RESET();
// modelDefault(0);
// RADIO_RESET();
}
};
#endif // _GTESTS_H_