unittest under betterC

DLearner bmqazwsx123 at gmail.com
Sun Jun 4 20:38:11 UTC 2023


Neither:
```
extern(C) int foo() {

    return 4;
}

unittest {

    assert(foo() != 4, "!= Assert triggered.");
    assert(foo() == 4, "== Assert triggered.");
}
```


Nor:
```
int foo() {

    return 4;
}

unittest {

    assert(foo() != 4, "!= Assert triggered.");
    assert(foo() == 4, "== Assert triggered.");
}
```

Triggers anything with:
```
dmd -betterC -main -unittest -i -run foo
```
Any ideas?


More information about the Digitalmars-d-learn mailing list