This looks like a nice test already. Can you move this to tests/src/ and add it to the CMakeLists.txt there? On failure, you just need to
    return EXIT_FAILURE;
and it will be fully integrated into our nightly test suite. 
For examples/tutorial/ it's better to throw all the checking away and only focus on showing how to use the feature for ~10x10 matrices.