mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8054717: SJavac should track changes in the public apis of classpath classes!
Added functionality for tracking changes in public APIs of classpath classes. Reviewed-by: jlahoda, erikj
This commit is contained in:
parent
66dcce4334
commit
3a31593507
88 changed files with 2917 additions and 1990 deletions
|
@ -48,27 +48,33 @@ public class CompileCircularSources extends SJavacTester {
|
|||
}
|
||||
|
||||
void test() throws Exception {
|
||||
Files.createDirectory(BIN);
|
||||
clean(TEST_ROOT);
|
||||
Files.createDirectories(BIN);
|
||||
clean(GENSRC, BIN);
|
||||
|
||||
Map<String,Long> previous_bin_state = collectState(BIN);
|
||||
|
||||
ToolBox tb = new ToolBox();
|
||||
tb.writeFile(GENSRC.resolve("alfa/omega/A.java"),
|
||||
"package alfa.omega; public class A { beta.B b; }");
|
||||
"package alfa.omega; public class A { beta.B b; }");
|
||||
tb.writeFile(GENSRC.resolve("beta/B.java"),
|
||||
"package beta; public class B { gamma.C c; }");
|
||||
"package beta; public class B { gamma.C c; }");
|
||||
tb.writeFile(GENSRC.resolve("gamma/C.java"),
|
||||
"package gamma; public class C { alfa.omega.A a; }");
|
||||
"package gamma; public class C { alfa.omega.A a; }");
|
||||
|
||||
compile("gensrc", "-d", "bin", "-h", "headers", "-j", "3",
|
||||
SERVER_ARG,"--log=debug");
|
||||
compile(GENSRC.toString(),
|
||||
"-d", BIN.toString(),
|
||||
"-h", HEADERS.toString(),
|
||||
"-j", "3",
|
||||
SERVER_ARG,
|
||||
"--log=debug");
|
||||
Map<String,Long> new_bin_state = collectState(BIN);
|
||||
verifyThatFilesHaveBeenAdded(previous_bin_state, new_bin_state,
|
||||
"bin/alfa/omega/A.class",
|
||||
"bin/beta/B.class",
|
||||
"bin/gamma/C.class",
|
||||
"bin/javac_state");
|
||||
verifyThatFilesHaveBeenAdded(previous_bin_state,
|
||||
new_bin_state,
|
||||
BIN + "/alfa/omega/A.class",
|
||||
BIN + "/beta/B.class",
|
||||
BIN + "/gamma/C.class",
|
||||
BIN + "/javac_state");
|
||||
clean(GENSRC, BIN);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue