Skip to content

Commit

Permalink
Rename TestUtils to UnitTestRegistration. (project-chip#4021)
Browse files Browse the repository at this point in the history
Looking to remove usage of 'Utils' unless we have really no choice.
'UnitTestRegistration' seems clearer in what it does compared to
'TestUtils'.
  • Loading branch information
andy31415 authored and hnnajh committed Dec 10, 2020
1 parent eea78f6 commit 307a5e8
Show file tree
Hide file tree
Showing 46 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion src/app/tests/TestMessageDef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <app/MessageDef.h>
#include <core/CHIPTLVDebug.hpp>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <system/SystemPacketBuffer.h>

#include <nlunit-test.h>
Expand Down
2 changes: 1 addition & 1 deletion src/ble/tests/TestBleErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

#include <ble/BleError.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/ble/tests/TestBleUUID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "TestBleLayer.h"

#include <ble/BleUUID.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/tests/CHIPCryptoPALTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <nlunit-test.h>
#include <support/CodeUtils.h>
#include <support/ScopedBuffer.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <stdarg.h>
#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion src/inet/tests/TestInetAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include <inet/IPPrefix.h>

#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

using namespace chip;
using namespace chip::Inet;
Expand Down
2 changes: 1 addition & 1 deletion src/inet/tests/TestInetEndPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

#include <support/CHIPArgParser.hpp>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <system/SystemError.h>
#include <system/SystemTimer.h>
Expand Down
2 changes: 1 addition & 1 deletion src/inet/tests/TestInetErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <inet/InetError.h>
#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/inet/tests/TestInetLayerDNS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#include <inet/InetLayer.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <system/SystemClock.h>
#include <system/SystemTimer.h>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/tests/TestCHIPCallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <core/CHIPCallback.h>
#include <support/CHIPMem.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/tests/TestCHIPErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

#include <core/CHIPError.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/tests/TestCHIPTLV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
#include <support/CodeUtils.h>
#include <support/RandUtils.h>
#include <support/ScopedBuffer.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <string.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/tests/TestReferenceCounted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <string.h>

#include <lib/core/ReferenceCounted.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/mdns/minimal/tests/TestIPResourceRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

#include <mdns/minimal/IPResourceRecord.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/mdns/minimal/tests/TestQName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

#include <mdns/minimal/QName.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/mdns/minimal/tests/TestRecordData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <string>
#include <vector>

#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/mdns/minimal/tests/TestResourceRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

#include <mdns/minimal/ResourceRecord.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/shell/tests/TestShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <shell/shell.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <inttypes.h>
#include <stdarg.h>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/shell/tests/TestStreamerStdio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include <shell/shell.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <inttypes.h>
#include <stdarg.h>
Expand Down
4 changes: 2 additions & 2 deletions src/lib/support/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ static_library("support") {
"SafeInt.h",
"SerializableIntegerSet.cpp",
"SerializableIntegerSet.h",
"TestUtils.cpp",
"TestUtils.h",
"TimeUtils.cpp",
"TimeUtils.h",
"UnitTestRegistration.cpp",
"UnitTestRegistration.h",
"logging/CHIPLogging.cpp",
"logging/CHIPLogging.h",
"logging/CHIPLoggingLogV.cpp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include <stdlib.h>
#include <string.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

namespace chip {

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/support/tests/TestBufBound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "TestSupport.h"

#include <support/BufBound.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/support/tests/TestBufferReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "TestSupport.h"

#include <support/BufferReader.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <type_traits>

#include <nlunit-test.h>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/support/tests/TestCHIPCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <nlunit-test.h>

#include <support/CHIPCounter.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

static void CheckStartWithZero(nlTestSuite * inSuite, void * inContext)
{
Expand Down
2 changes: 1 addition & 1 deletion src/lib/support/tests/TestCHIPMem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include <nlunit-test.h>
#include <support/CHIPMem.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

using namespace chip;
using namespace chip::Logging;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/support/tests/TestSafeInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "TestSupport.h"

#include <support/SafeInt.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/support/tests/TestScopedBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "TestSupport.h"

#include <support/ScopedBuffer.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/support/tests/TestSerializableIntegerSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <support/CHIPMem.h>
#include <support/CHIPMemString.h>
#include <support/SerializableIntegerSet.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/platform/tests/TestConfigurationMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <nlunit-test.h>
#include <support/CHIPMem.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <platform/CHIPDeviceLayer.h>

Expand Down
2 changes: 1 addition & 1 deletion src/platform/tests/TestPlatformTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include <nlunit-test.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <system/SystemClock.h>

#include <platform/internal/CHIPDeviceLayerInternal.h>
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/bdx/tests/TestBdxMessages.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <support/BufBound.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <limits>

Expand Down
2 changes: 1 addition & 1 deletion src/system/tests/TestSystemErrorStr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <inet/InetError.h>
#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/system/tests/TestSystemObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <nlunit-test.h>

Expand Down
2 changes: 1 addition & 1 deletion src/system/tests/TestSystemPacketBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <string.h>

#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <system/SystemPacketBuffer.h>

#if CHIP_SYSTEM_CONFIG_USE_LWIP
Expand Down
2 changes: 1 addition & 1 deletion src/system/tests/TestSystemTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <nlunit-test.h>
#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <system/SystemError.h>
#include <system/SystemLayer.h>
#include <system/SystemTimer.h>
Expand Down
2 changes: 1 addition & 1 deletion src/system/tests/TestSystemWakeEvent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <nlunit-test.h>
#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <system/SystemError.h>
#include <system/SystemLayer.h>
#include <system/SystemWakeEvent.h>
Expand Down
2 changes: 1 addition & 1 deletion src/system/tests/TestTimeSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <nlunit-test.h>
#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <system/TimeSource.h>

namespace {
Expand Down
2 changes: 1 addition & 1 deletion src/test_driver/esp32/main/main_app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <crypto/CHIPCryptoPAL.h>
#include <platform/CHIPDeviceLayer.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

using namespace ::chip;
using namespace ::chip::DeviceLayer;
Expand Down
2 changes: 1 addition & 1 deletion src/test_driver/nrfconnect/main/runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <platform/CHIPDeviceLayer.h>
#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>

#include <logging/log.h>
#include <settings/settings.h>
Expand Down
2 changes: 1 addition & 1 deletion src/transport/raw/tests/TestMessageHeader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <transport/raw/MessageHeader.h>

#include <nlunit-test.h>
Expand Down
2 changes: 1 addition & 1 deletion src/transport/raw/tests/TestTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <core/CHIPCore.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <transport/raw/TCP.h>

#include <nlbyteorder.h>
Expand Down
2 changes: 1 addition & 1 deletion src/transport/raw/tests/TestUDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <core/CHIPCore.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <transport/raw/UDP.h>

#include <nlbyteorder.h>
Expand Down
2 changes: 1 addition & 1 deletion src/transport/retransmit/tests/TestCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#include "TestRetransmit.h"

#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <transport/retransmit/Cache.h>

#include <bitset>
Expand Down
2 changes: 1 addition & 1 deletion src/transport/tests/TestPeerConnections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <support/CodeUtils.h>
#include <support/ErrorStr.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <transport/PeerConnections.h>

#include <nlunit-test.h>
Expand Down
2 changes: 1 addition & 1 deletion src/transport/tests/TestSecurePairingSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <stdarg.h>
#include <support/CHIPMem.h>
#include <support/CodeUtils.h>
#include <support/TestUtils.h>
#include <support/UnitTestRegistration.h>
#include <transport/SecurePairingSession.h>

using namespace chip;
Expand Down
Loading

0 comments on commit 307a5e8

Please sign in to comment.