Don't run tests on platforms they don't work on

Also, some formatting cleanup.