@Test
public void testMultipleLineDeclarationsOneLine() throws Exception {

  final String program = ""
      // This variable declaration has many declaration infos but we consider only the one that
      // has initializer (b, d, and f).
      + "int b = 1, c, d = foo(), e, f = bar();"
      + "void main() { }";
  final String expected = ""
      + "int b, c, d, e, f;"
      + "void main() {"
      + " f = bar();"
      + " d = foo();"
      + " b = 1;"
      + "}";
  final TranslationUnit tu = ParseHelper.parse(program);
  final List<GlobalVariableDeclToExprReductionOpportunity> ops =
      GlobalVariableDeclToExprReductionOpportunities
      .findOpportunities(MakeShaderJobFromFragmentShader.make(tu), new ReducerContext(true,
          ShadingLanguageVersion.ESSL_100,
          new RandomWrapper(0), new IdGenerator()));
  assertEquals(3, ops.size());
  ops.forEach(GlobalVariableDeclToExprReductionOpportunity::applyReductionImpl);
  CompareAsts.assertEqualAsts(expected, tu);
}