On Wednesday, 30 March 2022 at 04:15:24 UTC, Paul Backus wrote:
Probably the easiest way is to split it into two functions
```d
void f()
{
version (foo)
fVersionFoo();
else
fDefault();
}
void fVersionFoo()
{
/* ... */
}
void fDefault()
{
/* ... */
}
```
Then yo
On Tuesday, 29 March 2022 at 19:55:52 UTC, Andrey Zherikov wrote:
I have a function below (just an example). What's the
recommended way to unit-test it for all `version` cases?
```d
void f()
{
import std.stdio: writeln;
version(foo)
writeln("foo");
else
writeln("
On 3/29/22 8:57 PM, Andrey Zherikov wrote:
On Tuesday, 29 March 2022 at 20:20:46 UTC, Steven Schveighoffer wrote:
So keep in mind that versions are *module-wide*, and usually
*compilation-wide*. Which means that you won't be testing multiple
version configurations in the same build.
...
In t
On Tuesday, 29 March 2022 at 20:20:46 UTC, Steven Schveighoffer
wrote:
So keep in mind that versions are *module-wide*, and usually
*compilation-wide*. Which means that you won't be testing
multiple version configurations in the same build.
...
In the case where version is going to *affect th
On 3/29/22 3:55 PM, Andrey Zherikov wrote:
I have a function below (just an example). What's the recommended way to
unit-test it for all `version` cases?
```d
void f()
{
import std.stdio: writeln;
version(foo)
writeln("foo");
else
writeln("no foo");
}
```
So k
I have a function below (just an example). What's the recommended
way to unit-test it for all `version` cases?
```d
void f()
{
import std.stdio: writeln;
version(foo)
writeln("foo");
else
writeln("no foo");
}
```