mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 21:57:47 +00:00
[tests] use constexpr for constants in unit tests (#13145)
This commit refactors various unit tests to use `constexpr` for defining constants instead of anonymous `enum` types. Using `constexpr` is the modern and preferred approach in C++, as it provides explicit types for constants and improves code clarity and type safety.
This commit is contained in:
@@ -35,10 +35,7 @@
|
||||
namespace ot {
|
||||
namespace Spinel {
|
||||
|
||||
enum
|
||||
{
|
||||
kTestBufferSize = 800,
|
||||
};
|
||||
constexpr uint16_t kTestBufferSize = 800;
|
||||
|
||||
otError ReadFrame(Spinel::Buffer &aNcpBuffer, uint8_t *aFrame, uint16_t &aFrameLen)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user