mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
8008582: jtreg failures after conversion of shell tests to Java
Reviewed-by: jjg
This commit is contained in:
parent
52954e063d
commit
4ef6ef5d0f
10 changed files with 199 additions and 113 deletions
|
@ -38,7 +38,7 @@ import java.nio.file.Paths;
|
|||
//original test: test/tools/javah/ConstMacroTest.sh
|
||||
public class ConstMacroTest {
|
||||
|
||||
private static final String SubClassConstsGoldenFile =
|
||||
private static final String subClassConstsGoldenFileTemplate =
|
||||
"/* DO NOT EDIT THIS FILE - it is machine generated */\n" +
|
||||
"#include <jni.h>\n" +
|
||||
"/* Header for class SubClassConsts */\n" +
|
||||
|
@ -49,7 +49,7 @@ public class ConstMacroTest {
|
|||
"extern \"C\" {\n" +
|
||||
"#endif\n" +
|
||||
"#undef SubClassConsts_serialVersionUID\n" +
|
||||
"#define SubClassConsts_serialVersionUID 6733861379283244755LL\n" +
|
||||
"#define SubClassConsts_serialVersionUID 6733861379283244755%s\n" +
|
||||
"#undef SubClassConsts_SUPER_INT_CONSTANT\n" +
|
||||
"#define SubClassConsts_SUPER_INT_CONSTANT 3L\n" +
|
||||
"#undef SubClassConsts_SUPER_FLOAT_CONSTANT\n" +
|
||||
|
@ -71,6 +71,9 @@ public class ConstMacroTest {
|
|||
"#endif\n" +
|
||||
"#endif";
|
||||
|
||||
private static final String serialVersionUIDSuffix =
|
||||
ToolBox.isWindows() ? "i64" : "LL"; ;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
//first steps are now done by jtreg
|
||||
// cp "${TESTSRC}${FS}SuperClassConsts.java" .
|
||||
|
@ -85,8 +88,10 @@ public class ConstMacroTest {
|
|||
ToolBox.javah(successParams);
|
||||
|
||||
// diff ${DIFFOPTS} "${TESTSRC}${FS}${EXPECTED_JAVAH_OUT_FILE}" "${GENERATED_HEADER_FILE}"
|
||||
String subClassConstGoldenFile = String.format(subClassConstsGoldenFileTemplate,
|
||||
serialVersionUIDSuffix);
|
||||
ToolBox.compareLines(Paths.get("SubClassConsts.h"),
|
||||
ToolBox.splitLines(SubClassConstsGoldenFile), null);
|
||||
ToolBox.splitLines(subClassConstGoldenFile, "\n"), null, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue