mirror of
https://github.com/espressif/openthread.git
synced 2026-08-11 05: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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user