@Test
public void testUnsupportedDeclarationInCondition() throws Exception {

  // Change this test to check for support if it is eventually introduced.
  try {
    ParseHelper.parse("void main() {\n"
        + "  while(bool b = true) {\n"
        + "    if(b) {\n"
        + "      break;\n"
        + "    }\n"
        + "  }\n"
        + "}\n");
    fail("Exception was expected");
  } catch (UnsupportedLanguageFeatureException exception) {
    assertTrue(exception.getMessage().contains("We do not yet support the case where the "
        + "condition of a 'for' or 'while' introduces a new variable"));
  }
}