[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
+12 -12
View File
@@ -33,6 +33,8 @@
#include "test_platform.h"
#include "test_util.h"
namespace ot {
#if OPENTHREAD_FTD
void TestMinimumPassphrase(void)
@@ -97,21 +99,19 @@ void TestExampleInSpec(void)
testFreeInstance(instance);
}
} // namespace ot
#endif // OPENTHREAD_FTD
int main(void)
{
TestMinimumPassphrase();
TestMaximumPassphrase();
TestExampleInSpec();
#if OPENTHREAD_FTD
ot::TestMinimumPassphrase();
ot::TestMaximumPassphrase();
ot::TestExampleInSpec();
printf("All tests passed\n");
return 0;
}
#else // #if OPENTHREAD_FTD
int main(void)
{
#else
printf("PSKc generation is not supported on non-ftd build\n");
#endif
return 0;
}
#endif // #if OPENTHREAD_FTD