Skip to content

Add GODMODE-configurable delay to system calls #35

Open
@ianfixes

Description

@ianfixes

Summary

Time is expected to pass in the real world. In the mocked unit test environment, it doesn't. This means that otherwise-normal code will infinitely loop in tests

Arduino or Unit Test Code, Illustrating the Problem

  while((millis() < wait_timer) && (!FLAG_ABORT_PENDING)) {
    // waiting for random wait to finish
  }

Proposed solution

Add a configurable delay (0 by default) to all system calls: millis() most importantly, but also things like analogRead and analogWrite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    arduino mocksCompilation mocks for the Arduino libraryenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions