On 18.12.24 04:42, Ye Wison wrote:
> `hare test` runs all detected unit tests, but ignore> `protocols/http/+test/parser_test.ha` and> `protocols/http/request/+test/deint_test.ha` without any error, could> I know why?
Sometimes tests get skipped without warning, if there is an erroneous
use statement.
sorry, I didn't get it, could you have explain more:) Or the build driver doesn't support nested “+test” folder?
> On 18/12/2024, at 8:15 PM, Armin Preiml <apreiml@strohwolke.at> wrote:> > On 18.12.24 04:42, Ye Wison wrote:>> `hare test` runs all detected unit tests, but ignore>> `protocols/http/+test/parser_test.ha` and>> `protocols/http/request/+test/deint_test.ha` without any error, could>> I know why?> > Sometimes tests get skipped without warning, if there is an erroneous use statement.
On 18.12.24 10:43, Ye Wison wrote:
> sorry, I didn't get it, could you have explain more:) Or the build driver doesn't support nested “+test” folder?
Check if your `use` statements are correct. A typo in them will cause
the files to be skipped without message.
For example:
```
use byte;
@test fn test() void = {
assert(bytes::equal([1u8], [1u8]));
};
```
Here the use statement is missing the "s" at the end.
Thanks for the pointer, but it doesn't work for my case:) I tried your
above code, but it didn't skip the particular test cases, instead, it
stopped running all test cases, and it showed "No tests run":)
Also, when I tried to add few more folder and moved the test file
around, then I encount my prev posted question again:
xxxxx': `typedef variable $HARE_TD_xxx not set`
But if I create a new hare project, import (use) my current hare
project (I put it into the `third-party` folder), and run `hare run`
and `hare test`, then everything is fine.... I'm trying on Alpine
Linux.
On Wed, Dec 18, 2024 at 10:51 PM Armin Preiml <apreiml@strohwolke.at> wrote:
>> On 18.12.24 10:43, Ye Wison wrote:> > sorry, I didn't get it, could you have explain more:) Or the build driver doesn't support nested “+test” folder?>> Check if your `use` statements are correct. A typo in them will cause> the files to be skipped without message.>> For example:>> ```> use byte;>> @test fn test() void = {> assert(bytes::equal([1u8], [1u8]));> };> ```>> Here the use statement is missing the "s" at the end.