While writing tests to check certain functionality for all machines, I constantly come across random segfaults (bugs, missing inits), crashes, missing registered parameters (so clone/equals doesnt work), etc. All those are use-case motivated tests so quite bad.
We have some tests for all objects that check clone/equals consistency, but the problem is that this is only for the default ctor construction of objects. If for example, parameters are not registered (and so clone doesnt work), this will not be caught be the test. Another example is trained_model_serialization: if I set a parameter of some of the machines to the non-default value, the test fails simply because the parameter is not considered when serializing. The problem is that it is very hard to write non-default initializations for all machines by hand (default is done in ctor so that is fine). It would be nice to be able to instantiate a random combination of parameters for machines. So Any::random or something, at least for non-pointer parameters. Any thoughts on that? H