mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 16:30:22 +00:00
Address Copilot review: uint32 overflow guard, docstring, test namespace/include
This commit is contained in:
@@ -3,10 +3,11 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <span>
|
||||
#include <string>
|
||||
|
||||
#include "esphome/core/helpers.h"
|
||||
|
||||
namespace esphome::testing {
|
||||
namespace esphome::core::testing {
|
||||
|
||||
// Helper to call value_accuracy_to_buf and return as string
|
||||
static std::string va_to_string(float value, int8_t accuracy_decimals) {
|
||||
@@ -148,4 +149,4 @@ TEST(ValueAccuracyToBuf, ReturnsCorrectLength) {
|
||||
EXPECT_EQ(strlen(buf), len);
|
||||
}
|
||||
|
||||
} // namespace esphome::testing
|
||||
} // namespace esphome::core::testing
|
||||
|
||||
Reference in New Issue
Block a user