How to unit-test behavior under "version"?

Andrey Zherikov andrey.zherikov at gmail.com
Tue Mar 29 19:55:52 UTC 2022


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");
}
```


More information about the Digitalmars-d-learn mailing list