From e4ff2d94226a788de678e1ddef60cf47af57fa8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 25 Apr 2022 08:06:17 +0200 Subject: [PATCH] Update mac address test naming --- tests/auto/auto.pro | 2 +- tests/auto/macaddress/macaddress.pro | 7 +++++++ .../testmacaddress.cpp} | 14 +++++++------- .../macaddressunittests/macaddressunittests.pro | 7 ------- 4 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 tests/auto/macaddress/macaddress.pro rename tests/auto/{macaddressunittests/macaddressunittests.cpp => macaddress/testmacaddress.cpp} (94%) delete mode 100644 tests/auto/macaddressunittests/macaddressunittests.pro diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index a694d022..e2ebff30 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -8,7 +8,7 @@ SUBDIRS = \ logging \ loggingdirect \ loggingloading \ - macaddressunittests \ + macaddress \ mqttbroker \ plugins \ pythonplugins \ diff --git a/tests/auto/macaddress/macaddress.pro b/tests/auto/macaddress/macaddress.pro new file mode 100644 index 00000000..a45951b8 --- /dev/null +++ b/tests/auto/macaddress/macaddress.pro @@ -0,0 +1,7 @@ +TARGET = testmacaddress + +include(../../../nymea.pri) +include(../autotests.pri) + +SOURCES += testmacaddress.cpp + diff --git a/tests/auto/macaddressunittests/macaddressunittests.cpp b/tests/auto/macaddress/testmacaddress.cpp similarity index 94% rename from tests/auto/macaddressunittests/macaddressunittests.cpp rename to tests/auto/macaddress/testmacaddress.cpp index fc3aed29..55251f6c 100644 --- a/tests/auto/macaddressunittests/macaddressunittests.cpp +++ b/tests/auto/macaddress/testmacaddress.cpp @@ -34,7 +34,7 @@ using namespace nymeaserver; -class MacAddressUnitTests: public NymeaTestBase +class TestMacAddress: public NymeaTestBase { Q_OBJECT @@ -56,12 +56,12 @@ private slots: }; -void MacAddressUnitTests::initTestCase() +void TestMacAddress::initTestCase() { NymeaTestBase::initTestCase("*.debug=false\nTests.debug=true\n"); } -void MacAddressUnitTests::defaultConstructor() +void TestMacAddress::defaultConstructor() { MacAddress mac; QVERIFY(mac.isNull()); @@ -90,7 +90,7 @@ void MacAddressUnitTests::defaultConstructor() QCOMPARE(MacAddress(QString("aabbccddeeff")), MacAddress(validRawData)); } -void MacAddressUnitTests::macAddressValidation_data() +void TestMacAddress::macAddressValidation_data() { QTest::addColumn("macString"); QTest::addColumn("isValid"); @@ -116,7 +116,7 @@ void MacAddressUnitTests::macAddressValidation_data() 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(bool, isValid); @@ -130,5 +130,5 @@ void MacAddressUnitTests::macAddressValidation() QCOMPARE(mac.toString(), toString); } -#include "macaddressunittests.moc" -QTEST_MAIN(MacAddressUnitTests) +#include "testmacaddress.moc" +QTEST_MAIN(TestMacAddress) diff --git a/tests/auto/macaddressunittests/macaddressunittests.pro b/tests/auto/macaddressunittests/macaddressunittests.pro deleted file mode 100644 index 91dfd30d..00000000 --- a/tests/auto/macaddressunittests/macaddressunittests.pro +++ /dev/null @@ -1,7 +0,0 @@ -TARGET = macaddressunittests - -include(../../../nymea.pri) -include(../autotests.pri) - -SOURCES += macaddressunittests.cpp -