[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
+16 -12
View File
@@ -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;