On Monday, 5 June 2023 at 18:22:45 UTC, Ernesto Castellotti wrote:
[...]
It's not so easy to deal automatically in case of multiple
modules
_multiple modules_
The following code, in a batch (.bat) file, works for me:
```
@echo off
:loop
if [%1]==[] goto loopexit
type .\%1.d > .\__temp_%1.d
ech
On Monday, 5 June 2023 at 18:14:31 UTC, DLearner wrote:
On Monday, 5 June 2023 at 14:25:33 UTC, Mike Parker wrote:
[...]
Thank you for the link, can confirm that:
```
int foo() {
[...]
It's not so easy to deal automatically in case of multiple modules
On Monday, 5 June 2023 at 14:25:33 UTC, Mike Parker wrote:
[...]
The docs say it should work:
https://dlang.org/spec/betterc.html#unittests
[...]
Thank you for the link, can confirm that:
```
int foo() {
return 4;
}
unittest {
assert(foo() != 4, "!= Assert triggered.");
assert(fo
On Monday, 5 June 2023 at 14:29:35 UTC, Richard (Rikki) Andrew
Cattermole wrote:
On 06/06/2023 2:25 AM, Mike Parker wrote:
On Monday, 5 June 2023 at 14:16:39 UTC, ryuukk_ wrote:
In my book this is broken and needs to be fixed, as a user i
don't care about under the hood things, it's a you prob
On Monday, 5 June 2023 at 14:16:39 UTC, ryuukk_ wrote:
In my book this is broken and needs to be fixed, as a user i
don't care about under the hood things, it's a you problem,
user should be able to unit test
The docs say it should work:
https://dlang.org/spec/betterc.html#unittests
So eith
On 06/06/2023 2:25 AM, Mike Parker wrote:
On Monday, 5 June 2023 at 14:16:39 UTC, ryuukk_ wrote:
In my book this is broken and needs to be fixed, as a user i don't
care about under the hood things, it's a you problem, user should be
able to unit test
The docs say it should work:
https://dla
On 06/06/2023 2:16 AM, ryuukk_ wrote:
In my book this is broken and needs to be fixed, as a user i don't care
about under the hood things, it's a you problem, user should be able to
unit test
If you as the user disable key components required for the language to
fully work, its a you problem,
On Monday, 5 June 2023 at 11:41:08 UTC, Richard (Rikki) Andrew
Cattermole wrote:
On 05/06/2023 3:42 PM, ryuukk_ wrote:
I don't know how all this works, but the runtime shouldn't
know about tests, imagine if you ship a game, and the player
can run all the unittests, that doesn't make sense
Cur
On 05/06/2023 3:42 PM, ryuukk_ wrote:
I don't know how all this works, but the runtime shouldn't know about
tests, imagine if you ship a game, and the player can run all the
unittests, that doesn't make sense
Currently that is not possible. When you turn on unittests to be
compiled in, that r
On Monday, 5 June 2023 at 03:42:20 UTC, ryuukk_ wrote:
[...]
I don't know how all this works, ...
For what it is worth, running _both_ the above code fragments
with:
```
dmd -main -unittest -i -run foo
```
(ie removing the -betterC flag)
produces:
```
foo.d(8): [unittest] != Assert triggere
On Sunday, 4 June 2023 at 22:14:59 UTC, Richard (Rikki) Andrew
Cattermole wrote:
On 05/06/2023 9:20 AM, ryuukk_ wrote:
Then this needs to be fixed asap, unittest needs to work for
the flags user will use
There is nothing to fix.
You literally do not have any of the druntime code needed to
ha
On 05/06/2023 9:20 AM, ryuukk_ wrote:
Then this needs to be fixed asap, unittest needs to work for the flags
user will use
There is nothing to fix.
You literally do not have any of the druntime code needed to handle
ModuleInfo and hence call via it.
Nor do you have the entry point handled f
On Sunday, 4 June 2023 at 20:43:17 UTC, Richard (Rikki) Andrew
Cattermole wrote:
Unittests require some mechanism to execute them.
Druntime provides this capability by default.
You can do it manually by using ``__traits(getUnitTests)`` to
get access to the symbols.
Personally I just use full
Unittests require some mechanism to execute them.
Druntime provides this capability by default.
You can do it manually by using ``__traits(getUnitTests)`` to get access
to the symbols.
Personally I just use full D for unittests.
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 tr
15 matches
Mail list logo