SendMavCommandWithSignallingTest.h 966 Bytes
Newer Older
1 2
/****************************************************************************
 *
Gus Grubba's avatar
Gus Grubba committed
3
 * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
4 5 6 7 8 9
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

10
#pragma once
11 12

#include "UnitTest.h"
13
#include "Vehicle.h"
14

15
class SendMavCommandWithSignallingTest : public UnitTest
16 17 18 19
{
    Q_OBJECT
    
private slots:
20 21
    void _performTestCases(void);
    void _duplicateCommand(void);
22 23

private:
24 25 26 27 28 29 30 31 32 33
    typedef struct {
        MAV_CMD                             command;
        MAV_RESULT                          expectedCommandResult;
        Vehicle::MavCmdResultFailureCode_t  expectedFailureCode;
        int                                 expectedSendCount;
    } TestCase_t;

    void _testCaseWorker(TestCase_t& testCase);

    static TestCase_t _rgTestCases[];
34
};