/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6430241
* @summary Hard to disable symbol file feature through API
*/
public class T6430241 {
}
setup();
testTaskAPI();
if (errors > 0)
}
classesDir.mkdirs();
}
//----- tests for command line invocation
testCommandLine(true);
testCommandLine(false, "-XDignore.symbol.file");
}
}
//----- tests for simple API invocation
void testSimpleAPI() {
testSimpleAPI(true);
testSimpleAPI(false, "-XDignore.symbol.file");
}
}
//----- tests for CompilationTask API invocation
if (!f.isEmpty())
}
testTaskAPI(true, null);
testTaskAPI(false, bcp);
}
}
//----- utility methods
/**
* Create a file with given content.
*/
f.getParentFile().mkdirs();
try {
} finally {
}
return f;
}
/**
* Initialize args for compilation with given opts.
* @return opts -d classesDir testFile
*/
}
/**
* Show output from compilation if non empty.
*/
return out;
}
/**
* Verify compilation succeeeded.
*/
if (!ok)
error("compilation failed");
}
/**
* Verify compilation succeeeded.
*/
if (rc != 0)
}
/**
* Check whether output contains warnings if and only if warnings
* are expected.
*/
if (foundWarnings) {
if (!expectWarnings)
error("unexpected warnings found");
} else {
if (expectWarnings)
error("expected warnings not found");
}
}
/**
* Report an error.
*/
errors++;
}
int errors;
}