On 02/23/2016 01:10 PM, Robert Scholte wrote:

And maybe this is the key question: if src/main/java is a module, should we handle src/test/java as a module too or leave it as a classpath based project?

thanks,
Robert


You list 2 choices, but there's 3 possible answers here.

If you're writing a test that only exercises the public/exported API of the module, it could either be written as code in the unnamed module (a "classpath based project"), or it could be written as a separate, named module.

If your test is using the pattern of putting test classes in the same package as that which is being tested, then the test has to be part of the module being tested, which means you get into using -Xmodule at compile time and -Xpatch at runtime.

-- Jon

Reply via email to