Skip to content

ExpectWithArray doesn't store expected values #524

@fredo514

Description

@fredo514

Hi!

It seems like ExpectWithArray only stores the pointer to check the content later. This causes that when calling ExpectWithArray multiple times in a test case with the same buffer but with different content, all the checks are done using the last content.

e.g. both expects will compare to {0x03, 0x04}

uint8_t expected[2];

expected[0] = 0x01;
expected[1] = 0x02;
spi_write_ExpectWithArray(&expected, 2);

expected[0] = 0x03;
expected[1] = 0x04;
spi_write_ExpectWithArray(&expected, 2);

It would be much more convenient if ExpectWithArray would store the expected content internally for each call.

Thanks,

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