linkrope / dunit

xUnit Testing Framework for D
Boost Software License 1.0
37 stars 9 forks source link

Program exited with code -11: @BeforeAll #27

Closed andre2007 closed 4 years ago

andre2007 commented 4 years ago

By adding a @BeforeAll method to my class (independent whether beforeAll method is marked as static or not) the application crashes with Program exited with code -11 on ubuntu 18.

import dunit;

class OperatorTests
{
    mixin UnitTest;

    @BeforeAll void beforeAll(){}
    @Test void test1(){}
}
linkrope commented 4 years ago

There is a @BeforeAll in the example: https://github.com/linkrope/dunit/blob/master/example.d#L80-L84

Does this also crash on your machine?

$ ./example.d
...
Tests run: 14, Failures: 4, Errors: 1, Skips: 1
NOT OK
Program exited with code 1
andre2007 commented 4 years ago

I just found out, it is related to the function name. beforeAll causes a crash, while beforeAll1 and anything else is working fine. Therefore the sample is workin, due to the name setUpAll.