malloc error when trying to assign the returned pointer to a struct field

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Fri Sep 8 13:34:42 UTC 2023


In case you didn't know, all you need to get unittests working in 
-betterC is:

```d
			foreach (module_; allModules) {
				foreach (unitTest; __traits(getUnitTests, module_)) {
					unitTest();
				}
			}
```

You'd need to provide allModules somehow, like dub does.

https://github.com/dlang/dub/blob/2ea883833adf085095b07a7dba8250fb3db79a71/source/dub/project.d#L1937


More information about the Digitalmars-d-learn mailing list