2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
26 #include "drivers/serial.h"
27 #include "io/serial.h"
29 void serialInit(serialConfig_t *initialSerialConfig);
33 #include "unittest_macros.h"
34 #include "gtest/gtest.h"
36 //uint32_t testFeatureMask = 0;
39 TEST(IoSerialTest, TestFindPortConfig)
42 serialConfig_t serialConfig;
43 memset(&serialConfig, 0, sizeof(serialConfig));
46 serialInit(&serialConfig);
49 serialPortConfig_t *portConfig = findSerialPortConfig(FUNCTION_MSP);
52 EXPECT_EQ(NULL, portConfig);
60 //bool feature(uint32_t mask) {
61 // return (mask & testFeatureMask);
64 void delay(uint32_t) {}
65 void cliEnter(serialPort_t *) {}
66 void cliProcess(void) {}
67 bool isSerialTransmitBufferEmpty(serialPort_t *) {
70 void mspProcess(void) {}
71 void systemResetToBootloader(void) {}