- Make include/ the canonical declarations for data_model/html_util/json_codec and convert dd3_legacy_core header copies to thin forwarders. - Add stable public forwarders for app_context/receiver_pipeline/sender_state_machine and update refactor smoke test to stop using ../../src includes. - Force-link dd3_legacy_core from setup() to ensure deterministic PlatformIO LDF linking across firmware envs. - Refresh docs (README, Requirements, docs/TESTS.md) to reflect current module paths and smoke-test include strategy.
42 lines
975 B
C++
42 lines
975 B
C++
#include <Arduino.h>
|
|
#include <unity.h>
|
|
|
|
#include "app_context.h"
|
|
#include "receiver_pipeline.h"
|
|
#include "sender_state_machine.h"
|
|
#include "config.h"
|
|
|
|
static void test_refactor_headers_and_types() {
|
|
SenderStateMachineConfig sender_cfg = {};
|
|
sender_cfg.short_id = 0xF19C;
|
|
sender_cfg.device_id = "dd3-F19C";
|
|
|
|
ReceiverSharedState shared = {};
|
|
ReceiverPipelineConfig receiver_cfg = {};
|
|
receiver_cfg.short_id = 0xF19C;
|
|
receiver_cfg.device_id = "dd3-F19C";
|
|
receiver_cfg.shared = &shared;
|
|
|
|
SenderStateMachine sender_sm;
|
|
ReceiverPipeline receiver_pipe;
|
|
|
|
TEST_ASSERT_EQUAL_UINT16(0xF19C, sender_cfg.short_id);
|
|
TEST_ASSERT_NOT_NULL(receiver_cfg.shared);
|
|
(void)sender_sm;
|
|
(void)receiver_pipe;
|
|
}
|
|
|
|
static void test_ha_manufacturer_constant() {
|
|
TEST_ASSERT_EQUAL_STRING("AcidBurns", HA_MANUFACTURER);
|
|
}
|
|
|
|
void setup() {
|
|
UNITY_BEGIN();
|
|
RUN_TEST(test_refactor_headers_and_types);
|
|
RUN_TEST(test_ha_manufacturer_constant);
|
|
UNITY_END();
|
|
}
|
|
|
|
void loop() {}
|
|
|