For "fun" I'm loosely porting a few Java classes to PHP (e.g. java.util.regex.Matcher
), so I'd like to be able to run/port the unit tests for these:
java.lang.StringBuilder
java.util.regex.Pattern
java.util.regex.Matcher
Where can I find them? Tests from any semi-recent version would be helpful.
The OpenJDK project offers its source online. The test directory for e.g. StringBuilder
can be found at http://hg.openjdk.java.net/jdk7u/jdk7u2/jdk/file/58ad18490a50/test/java/lang/StringBuilder/. Replace the version number with the version you are interested in, and adjust the path accordingly to find the tests for all other classes.