mirror of
https://github.com/espressif/openthread.git
synced 2026-08-09 04:07:47 +00:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user