[test] define all unit tests in ot namespace (#9617)

This commit updates unit test modules to be defined under the `ot`
namespace. This aligns all the unit tests to follow the same
model, eliminating the need to use `ot::` prefix in unit test
code.
This commit is contained in:
Abtin Keshavarzian
2023-11-19 18:40:20 -08:00
committed by GitHub
parent b77573586c
commit 23c0fc4d4b
28 changed files with 436 additions and 389 deletions
+5 -3
View File
@@ -38,6 +38,8 @@
#include "instance/instance.hpp"
#include "net/dns_dso.hpp"
namespace ot {
#if OPENTHREAD_CONFIG_DNS_DSO_ENABLE
extern "C" {
@@ -73,7 +75,7 @@ void AdvanceTime(uint32_t aDuration)
Log(" AdvanceTime for %u.%03u", aDuration / 1000, aDuration % 1000);
while (ot::TimeMilli(sAlarmTime) <= ot::TimeMilli(time))
while (TimeMilli(sAlarmTime) <= TimeMilli(time))
{
sNow = sAlarmTime;
otPlatAlarmMilliFired(sInstance);
@@ -82,7 +84,6 @@ void AdvanceTime(uint32_t aDuration)
sNow = time;
}
namespace ot {
namespace Dns {
OT_TOOL_PACKED_BEGIN
@@ -1218,10 +1219,11 @@ void TestDso(void)
}
} // namespace Dns
} // namespace ot
#endif // OPENTHREAD_CONFIG_DNS_DSO_ENABLE
} // namespace ot
int main(void)
{
#if OPENTHREAD_CONFIG_DNS_DSO_ENABLE