Update mac address test naming
This commit is contained in:
parent
c59185672f
commit
e4ff2d9422
@ -8,7 +8,7 @@ SUBDIRS = \
|
|||||||
logging \
|
logging \
|
||||||
loggingdirect \
|
loggingdirect \
|
||||||
loggingloading \
|
loggingloading \
|
||||||
macaddressunittests \
|
macaddress \
|
||||||
mqttbroker \
|
mqttbroker \
|
||||||
plugins \
|
plugins \
|
||||||
pythonplugins \
|
pythonplugins \
|
||||||
|
|||||||
7
tests/auto/macaddress/macaddress.pro
Normal file
7
tests/auto/macaddress/macaddress.pro
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
TARGET = testmacaddress
|
||||||
|
|
||||||
|
include(../../../nymea.pri)
|
||||||
|
include(../autotests.pri)
|
||||||
|
|
||||||
|
SOURCES += testmacaddress.cpp
|
||||||
|
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
using namespace nymeaserver;
|
using namespace nymeaserver;
|
||||||
|
|
||||||
class MacAddressUnitTests: public NymeaTestBase
|
class TestMacAddress: public NymeaTestBase
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -56,12 +56,12 @@ private slots:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void MacAddressUnitTests::initTestCase()
|
void TestMacAddress::initTestCase()
|
||||||
{
|
{
|
||||||
NymeaTestBase::initTestCase("*.debug=false\nTests.debug=true\n");
|
NymeaTestBase::initTestCase("*.debug=false\nTests.debug=true\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacAddressUnitTests::defaultConstructor()
|
void TestMacAddress::defaultConstructor()
|
||||||
{
|
{
|
||||||
MacAddress mac;
|
MacAddress mac;
|
||||||
QVERIFY(mac.isNull());
|
QVERIFY(mac.isNull());
|
||||||
@ -90,7 +90,7 @@ void MacAddressUnitTests::defaultConstructor()
|
|||||||
QCOMPARE(MacAddress(QString("aabbccddeeff")), MacAddress(validRawData));
|
QCOMPARE(MacAddress(QString("aabbccddeeff")), MacAddress(validRawData));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacAddressUnitTests::macAddressValidation_data()
|
void TestMacAddress::macAddressValidation_data()
|
||||||
{
|
{
|
||||||
QTest::addColumn<QString>("macString");
|
QTest::addColumn<QString>("macString");
|
||||||
QTest::addColumn<bool>("isValid");
|
QTest::addColumn<bool>("isValid");
|
||||||
@ -116,7 +116,7 @@ void MacAddressUnitTests::macAddressValidation_data()
|
|||||||
QTest::newRow("Too long") << "xx:yy:zz:dd:ee:ee:ee" << false << true << m_zeroMacString;
|
QTest::newRow("Too long") << "xx:yy:zz:dd:ee:ee:ee" << false << true << m_zeroMacString;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacAddressUnitTests::macAddressValidation()
|
void TestMacAddress::macAddressValidation()
|
||||||
{
|
{
|
||||||
QFETCH(QString, macString);
|
QFETCH(QString, macString);
|
||||||
QFETCH(bool, isValid);
|
QFETCH(bool, isValid);
|
||||||
@ -130,5 +130,5 @@ void MacAddressUnitTests::macAddressValidation()
|
|||||||
QCOMPARE(mac.toString(), toString);
|
QCOMPARE(mac.toString(), toString);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "macaddressunittests.moc"
|
#include "testmacaddress.moc"
|
||||||
QTEST_MAIN(MacAddressUnitTests)
|
QTEST_MAIN(TestMacAddress)
|
||||||
@ -1,7 +0,0 @@
|
|||||||
TARGET = macaddressunittests
|
|
||||||
|
|
||||||
include(../../../nymea.pri)
|
|
||||||
include(../autotests.pri)
|
|
||||||
|
|
||||||
SOURCES += macaddressunittests.cpp
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user