Skip to content

test failure on MacOS #37

@SingingBush

Description

@SingingBush

src/dunit/assertion.d seems to have a problem on Mac OS with this unit test:

unittest
{
    assertEventually({ static count = 0; return ++count > 23; });

    auto exception = expectThrows!AssertException(assertEventually({ return false; }));

    assertEquals("timed out", exception.msg);
}

Building with either dmd or ldc on macos-latest (github runner) gets the following output:

Run dub test --coverage
    Fetching undead 1.1.8 (getting selected version)
    Starting Performing "unittest-cov" build using /Users/runner/hostedtoolcache/dc/dmd-2.10[6](https://github.com/SingingBush/dunit/actions/runs/7184674452/job/19566285169#step:5:7).0/x64/dmd2/osx/bin/dmd for x[8](https://github.com/SingingBush/dunit/actions/runs/7184674452/job/19566285169#step:5:9)6_64.
    Building undead 1.1.8: building configuration [library]
    Building d-unit ~ci/github_action: building configuration [unittest]
     Linking d-unit
     Running d-unit 
F.

There was 1 failure:
1) dunit.assertion.unittest
src/dunit/assertion.d:688 dunit.assertion.AssertException: timed out

Tests run: 2, Failures: 1, Errors: 0, Skips: 0
NOT OK
Error Program exited with code 2
Error: Process completed with exit code 2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions