Skip to content

zpc/unify: Use upstream cmock vanilla #75

@rzr

Description

@rzr

It has been patched with (Added array_as_byte config options ) to support anonymous structures to prevent following failure:

FAILED: applications/zpc/components/zwave/zwave_transports/s2/CMakeFiles/libs2_mock.dir/mocks/s2_inclusion_mock.c.o 
/home/phcoval/mnt/z-wave-protocol-controller/build/applications/zpc/components/zwave/zwave_transports/s2/mocks/s2_inclusion_mock.c: In function ‘s2_inclusion_challenge_response’:
/home/phcoval/mnt/z-wave-protocol-controller/build/applications/zpc/components/zwave/zwave_transports/s2/mocks/s2_inclusion_mock.c:486:123: error: invalid application of ‘sizeof’ to incomplete type ‘struct S2’
  486 |       { UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY((void*)(cmock_call_instance->Expected_p_context), (void*)(p_context), sizeof(struct S2), cmock_call_instance->Expected_p_context_Depth, cmock_line, CMockStringMismatch); }
/home/phcoval/mnt/z-wave-protocol-controller/build/_deps/cmock-src/vendor/unity/src/unity_internals.h:896:198: note: in definition of macro ‘UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY’
  896 | #define UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, line, message) UnityAssertEqualMemory((UNITY_INTERNAL_PTR)(expected), (UNITY_INTERNAL_PTR)(actual), (UNITY_UINT32)(len), (UNITY_UINT32)(num_elements), (message), (UNITY_LINE_TYPE)(line), UNITY_ARRAY_TO_ARRAY)

This is introducing technical debt , we might need to find a better solution:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions