atilaneves / unit-threaded

Advanced unit test framework for D
BSD 3-Clause "New" or "Revised" License
122 stars 38 forks source link

shouldBeEmpty broken with const arrays #298

Closed John-Colvin closed 1 year ago

John-Colvin commented 1 year ago

I expect it was broken by https://github.com/atilaneves/unit-threaded/commit/061c62d98b91c507faa4e7e02c6d21348709de3d

I added this to the end of tests/unit_threaded/ut/issues.d to demonstrate:

@safe pure unittest {
    const(int[]) csa2;
    csa2.shouldBeEmpty();
}
tests/unit_threaded/ut/issues.d(358,23): Error: `unit_threaded.light.shouldBeEmpty` called with argument types `(const(int[]))` matches both:
source/unit_threaded/light.d(388,6):     `unit_threaded.light.shouldBeEmpty!(const(int)[]).shouldBeEmpty(ref scope const(int[]) rng, string file, ulong line)`
and:
source/unit_threaded/light.d(402,6):     `unit_threaded.light.shouldBeEmpty!(const(int[])).shouldBeEmpty(ref scope const(int[]) rng, string file, ulong line)`