SlugsMavUnitTest.cc 604 Bytes
Newer Older
Alejandro's avatar
Alejandro committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include "SlugsMavUnitTest.h"

SlugsMavUnitTest::SlugsMavUnitTest()
{
}

void SlugsMavUnitTest::initTestCase()
{
    mav = new MAVLinkProtocol();
    slugsMav = new SlugsMAV(mav, UASID);
}

void SlugsMavUnitTest::cleanupTestCase()
{
    delete slugsMav;
    delete mav;
}

void SlugsMavUnitTest::first_test()
{
  QCOMPARE(1,1);
}

Alejandro's avatar
Alejandro committed
24 25 26 27 28 29 30 31 32 33 34
void SlugsMavUnitTest::getPwmCommands_test()
{
    mavlink_pwm_commands_t* k = slugsMav->getPwmCommands();
    k->aux1=80;

    mavlink_pwm_commands_t* k2 = slugsMav->getPwmCommands();
    k2->aux1=81;

    QCOMPARE(k->aux1, k2->aux1);
}