mirror of
https://github.com/espressif/openthread.git
synced 2026-08-02 00:57: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:
@@ -37,16 +37,18 @@
|
||||
|
||||
#include "test_util.hpp"
|
||||
|
||||
using ot::Utils::CmdLineParser::ParseAsBool;
|
||||
using ot::Utils::CmdLineParser::ParseAsHexString;
|
||||
using ot::Utils::CmdLineParser::ParseAsHexStringSegment;
|
||||
using ot::Utils::CmdLineParser::ParseAsInt16;
|
||||
using ot::Utils::CmdLineParser::ParseAsInt32;
|
||||
using ot::Utils::CmdLineParser::ParseAsInt8;
|
||||
using ot::Utils::CmdLineParser::ParseAsUint16;
|
||||
using ot::Utils::CmdLineParser::ParseAsUint32;
|
||||
using ot::Utils::CmdLineParser::ParseAsUint64;
|
||||
using ot::Utils::CmdLineParser::ParseAsUint8;
|
||||
namespace ot {
|
||||
|
||||
using Utils::CmdLineParser::ParseAsBool;
|
||||
using Utils::CmdLineParser::ParseAsHexString;
|
||||
using Utils::CmdLineParser::ParseAsHexStringSegment;
|
||||
using Utils::CmdLineParser::ParseAsInt16;
|
||||
using Utils::CmdLineParser::ParseAsInt32;
|
||||
using Utils::CmdLineParser::ParseAsInt8;
|
||||
using Utils::CmdLineParser::ParseAsUint16;
|
||||
using Utils::CmdLineParser::ParseAsUint32;
|
||||
using Utils::CmdLineParser::ParseAsUint64;
|
||||
using Utils::CmdLineParser::ParseAsUint8;
|
||||
|
||||
template <typename ValueType> struct TestCase
|
||||
{
|
||||
@@ -352,10 +354,12 @@ void TestParsingHexStrings(void)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ot
|
||||
|
||||
int main(void)
|
||||
{
|
||||
TestParsingInts();
|
||||
TestParsingHexStrings();
|
||||
ot::TestParsingInts();
|
||||
ot::TestParsingHexStrings();
|
||||
|
||||
printf("All tests passed\n");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user