mirror of
https://github.com/esphome/esphome.git
synced 2026-09-18 18:48:39 +00:00
[api] Check the encoded end against the reserved size under ESPHOME_DEBUG_API
The fixed32 store helper moves to a private section since it neither bounds checks nor advances the cursor, its comment describes the path each target takes, the generated file scan flags any ProtoEncode call that does not assign the cursor, and StateWaiter timeouts can carry a label so gathered waits are told apart.
This commit is contained in:
@@ -387,6 +387,6 @@ def test_generated_encode_calls_keep_the_cursor() -> None:
|
||||
dropped = [
|
||||
line
|
||||
for line in CPP_TEXT.splitlines()
|
||||
if line.lstrip().startswith("ProtoEncode::")
|
||||
if "ProtoEncode::" in line and "pos = ProtoEncode::" not in line
|
||||
]
|
||||
assert not dropped, dropped[:5]
|
||||
|
||||
Reference in New Issue
Block a user