linkrope / dunit

xUnit Testing Framework for D

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Program exited with code -11: @BeforeAll

andre2007 opened this issue · comments

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(){}
}

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

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.