api / koma.util.test / allBackends

allBackends

fun allBackends(f: () ->Unit):Unit

A helper function to run tests against all available backends in sequence. Sets koma.factory to each backend consecutively and then runs the passed in block of code. Note that code that manually sets its own backend (e.g. by creating a MTJMatrix instance explicitly) will not be affected by this function. Code that uses top-level functions and generic Matrix functions should work correctly.

Note: this function sets koma.factory to an arbitrary backend, so reset it afterwards if needed.