Libmatrix unittesting and constraints