Skip to content

Sub-sequences that don't require any ordering #53

@Crzyrndm

Description

@Crzyrndm

Currently the "expectations" list for I2C/SPI bus mocks assert an absolute ordering. This is overly restrictive in some cases and locks the test to the process implementation rather than allowing the actual driver requirements to be encoded

Example

An I2C device initialisation that I have goes something like this

  1. a wakeup/unlock sequence (fixed order)
  2. transfer of configuration (a number of registers in any order)
  3. a sleep/lock sequence (fixed order)

With the current crate version, I'm pretty sure my test would have to encode a fixed ordering of operations for that second step. Allowing an unordered set of transactions to occur instead would be beneficial to encode what I actually want to test

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