[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
+9 -5
View File
@@ -30,6 +30,8 @@
#include "common/arg_macros.hpp"
namespace ot {
static constexpr uint8_t NumberOfArgs(void) { return 0; }
static constexpr uint8_t NumberOfArgs(uint8_t) { return 1; }
@@ -132,13 +134,15 @@ exit:
VerifyOrQuit(!reachedEnd && didAction, "VerifyOrExit() failed");
}
} // namespace ot
int main(void)
{
TestMacros();
TestVerifyOrExitSuccessNoAction();
TestVerifyOrExitFailureNoAction();
TestVerifyOrExitSuccessWithAction();
TestVerifyOrExitFailureWithAction();
ot::TestMacros();
ot::TestVerifyOrExitSuccessNoAction();
ot::TestVerifyOrExitFailureNoAction();
ot::TestVerifyOrExitSuccessWithAction();
ot::TestVerifyOrExitFailureWithAction();
printf("All tests passed\n");
return 0;
}