mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-21 23:35:34 +03:00
move unittest specific stuff to unittest
This commit is contained in:
parent
a38eb4350d
commit
8c8c9f5e7a
4 changed files with 6 additions and 34 deletions
|
@ -618,11 +618,6 @@ const clivalue_t valueTable[] = {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// UNIT TEST for arrays (as long as no array entries are defined here)
|
|
||||||
#ifdef UNIT_TEST
|
|
||||||
{ "array_unit_test", VAR_INT8 | MODE_ARRAY | MASTER_VALUE, .config.array.length = 3, PG_RESERVED_FOR_TESTING_1, 0 },
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// PG_LED_STRIP_CONFIG
|
// PG_LED_STRIP_CONFIG
|
||||||
#ifdef LED_STRIP
|
#ifdef LED_STRIP
|
||||||
{ "ledstrip_visual_beeper", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_LED_STRIP_CONFIG, offsetof(ledStripConfig_t, ledstrip_visual_beeper) },
|
{ "ledstrip_visual_beeper", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, .config.lookup = { TABLE_OFF_ON }, PG_LED_STRIP_CONFIG, offsetof(ledStripConfig_t, ledstrip_visual_beeper) },
|
||||||
|
|
|
@ -55,7 +55,6 @@ blackbox_encoding_unittest_SRC := \
|
||||||
cli_unittest_SRC := \
|
cli_unittest_SRC := \
|
||||||
$(USER_DIR)/fc/cli.c \
|
$(USER_DIR)/fc/cli.c \
|
||||||
$(USER_DIR)/config/feature.c \
|
$(USER_DIR)/config/feature.c \
|
||||||
$(USER_DIR)/fc/settings.c \
|
|
||||||
$(USER_DIR)/config/parameter_group.c \
|
$(USER_DIR)/config/parameter_group.c \
|
||||||
$(USER_DIR)/common/typeconversion.c
|
$(USER_DIR)/common/typeconversion.c
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,11 @@ extern "C" {
|
||||||
void cliGet(char *cmdline);
|
void cliGet(char *cmdline);
|
||||||
void *getValuePointer(const clivalue_t *value);
|
void *getValuePointer(const clivalue_t *value);
|
||||||
|
|
||||||
|
const clivalue_t valueTable[] = {
|
||||||
|
{ "array_unit_test", VAR_INT8 | MODE_ARRAY | MASTER_VALUE, .config.array.length = 3, PG_RESERVED_FOR_TESTING_1, 0 }
|
||||||
|
};
|
||||||
|
const uint16_t valueTableEntryCount = ARRAYLEN(valueTable);
|
||||||
|
const lookupTableEntry_t lookupTables[] = {};
|
||||||
|
|
||||||
|
|
||||||
PG_REGISTER_WITH_RESET_FN(osdConfig_t, osdConfig, PG_OSD_CONFIG, 0);
|
PG_REGISTER_WITH_RESET_FN(osdConfig_t, osdConfig, PG_OSD_CONFIG, 0);
|
||||||
|
@ -78,7 +83,6 @@ extern "C" {
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "unittest_macros.h"
|
#include "unittest_macros.h"
|
||||||
#include "unittest_cli.h"
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
TEST(CLIUnittest, TestCliSet)
|
TEST(CLIUnittest, TestCliSet)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
/*
|
|
||||||
* This file is part of Cleanflight.
|
|
||||||
*
|
|
||||||
* Cleanflight is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation, either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* Cleanflight 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.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
}
|
|
||||||
|
|
||||||
#include "unittest_macros.h"
|
|
||||||
#include "gtest/gtest.h"
|
|
Loading…
Add table
Add a link
Reference in a new issue