Skip to content

Running unit tests on 64 bit Linux  #7

@end2endzone

Description

@end2endzone

When running unit test on a 64 bit Linux platform, the following unit tests is failing and shows the following output:

[ RUN      ] TestSoftTimers.testMicrosOverflow
/home/runner/work/SoftTimers/SoftTimers/test/TestSoftTimers.cpp:100: Failure
Value of: t.hasTimedOut()
  Actual: true
Expected: false
Unexpected timeout! getElapsedTime() returns 18446744069414584627. micros() returns 53
[  FAILED  ] TestSoftTimers.testMicrosOverflow (0 ms)

This is because unsigned long is 64 bit on Linux 64 bit. The win32Arduino unit test library used to define the return type of millis and micros functions as uint32_t which was forcing 32 bits even on 64 bit systems. Following the correction for #5, both functions return type is now unsigned long (which is matching the official Arduino.h definition) but this creates issues with unit tests.

Unit tests must be corrected to run without errors in both 32 bit and 64 platforms.

Related to issue #5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions