@Test
public void testTranslationToCompute() throws Exception {

  // Check that we can turn fragment shaders into valid compute shaders.
  final File referencesDir = Paths.get(ToolPaths.getShadersDirectory(), "samples",
      "320es").toFile();
  final ShaderJobFileOperations fileOps = new ShaderJobFileOperations();
  String[] blacklist = {"trigonometric_strip", "mergesort_mosaic"};
  for (File reference :
      referencesDir.listFiles((dir, name) -> name.endsWith(".json")
          && Arrays.stream(blacklist).noneMatch(s -> name.contains(s)))) {
    File outputShaderJob = temporaryFolder.newFile(reference.getName());
    Fragment2Compute.mainHelper(reference.getAbsolutePath(), outputShaderJob.getAbsolutePath());
    assertTrue(fileOps.getUnderlyingShaderFile(outputShaderJob, ShaderKind.COMPUTE)
        .isFile());
    assertTrue(fileOps.areShadersValid(outputShaderJob, false));
  }
}