[CLI] Replace K2 -Xmodule by -Xfragments and -Xfragment-sources

KT-56210
This commit is contained in:
Sebastian Sellmair
2023-02-21 15:12:21 +01:00
committed by Space Team
parent 8e5b19fe96
commit 21bf497830
30 changed files with 157 additions and 92 deletions
@@ -717,12 +717,18 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
} }
@Argument( @Argument(
value = "-Xmodule", value = "-Xfragments",
valueDescription = "<module name>;<source file[,source file...]>", valueDescription = "<fragment name>",
description = "Describes module with specific sources. Usage of this arguments requires to specify module for each source file from free args", description = "Declares all known fragments of a multiplatform compilation"
delimiter = ""
) )
var modulesDescription: Array<String>? = null var fragments: Array<String>? = null
@Argument(
value = "-Xfragment-sources",
valueDescription = "<fragment name>;<path>",
description = "Adds sources to a specific fragment of a multiplatform compilation",
)
var fragmentSources: Array<String>? = null
set(value) { set(value) {
checkFrozen() checkFrozen()
field = value field = value
@@ -732,7 +738,6 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
value = "-Xdepends-on", value = "-Xdepends-on",
valueDescription = "<fromModuleName>:<onModuleName>", valueDescription = "<fromModuleName>:<onModuleName>",
description = "Declares that <fromModuleName> depends on <onModuleName> with dependsOn relation", description = "Declares that <fromModuleName> depends on <onModuleName> with dependsOn relation",
delimiter = ""
) )
var dependsOnDependencies: Array<String>? = null var dependsOnDependencies: Array<String>? = null
set(value) { set(value) {
@@ -130,7 +130,8 @@ private fun <A : CommonToolArguments> MessageCollector.reportUnsafeInternalArgum
} }
private fun CompilerConfiguration.buildHmppModuleStructure(arguments: CommonCompilerArguments): HmppCliModuleStructure? { private fun CompilerConfiguration.buildHmppModuleStructure(arguments: CommonCompilerArguments): HmppCliModuleStructure? {
val rawModules = arguments.modulesDescription val rawFragments = arguments.fragments
val rawFragmentSources = arguments.fragmentSources
val rawDependencies = arguments.dependsOnDependencies val rawDependencies = arguments.dependsOnDependencies
val messageCollector = getNotNull(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY) val messageCollector = getNotNull(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY)
@@ -143,33 +144,41 @@ private fun CompilerConfiguration.buildHmppModuleStructure(arguments: CommonComp
messageCollector.report(CompilerMessageSeverity.WARNING, message) messageCollector.report(CompilerMessageSeverity.WARNING, message)
} }
if (rawModules == null) { if (rawFragments == null) {
if (rawDependencies != null) { if (rawDependencies != null) {
reportError("-Xdepends-on flag can not be used without -Xmodule") reportError("-Xdepends-on flag can not be used without -Xfragments")
} }
return null return null
} }
if (!languageVersionSettings.languageVersion.usesK2) { if (!languageVersionSettings.languageVersion.usesK2) {
reportWarning("-Xmodule flag is not supported for language version < 2.0") reportWarning("-Xfragments flag is not supported for language version < 2.0")
return null return null
} }
var modules = rawModules.mapNotNull { arg ->
val split = arg.split(";") val sourcesByFragmentName: Map<String, Set<String>> = rawFragments.associateWith { mutableSetOf<String>() }.apply {
val name = split.first() rawFragmentSources.orEmpty().forEach { rawFragmentSourceArg ->
when (split.size) { val split = rawFragmentSourceArg.split(";")
1 -> reportWarning("Incorrect syntax for -Xmodule argument. Module $name has no sources") if (split.size != 2) {
2 -> {} // OK reportError(
else -> { "Incorrect syntax for -Xfragment-sources argument. " +
reportError("Incorrect syntax for -Xmodule argument. `<module name>;<source file[,source file...]>` expected but got `$arg`") "`<module name>;<source file>` expected but got `$rawFragmentSourceArg`"
return@mapNotNull null )
return@forEach
} }
val fragmentName = split[0]
val fragmentSource = split[1]
getOrElse(fragmentName) {
reportError("fragment `$fragmentName` of source file $fragmentSource is not specified in -Xfragments")
return@forEach
}.add(fragmentSource)
} }
val sources = split.getOrNull(1)?.split(",")?.toSet().orEmpty()
HmppCliModule(name, sources)
} }
var modules = sourcesByFragmentName.map { (fragmentName, sources) -> HmppCliModule(fragmentName, sources) }
var wasError = false var wasError = false
// check sources mapping // check sources mapping
for (i in modules.indices) { for (i in modules.indices) {
@@ -185,7 +194,10 @@ private fun CompilerConfiguration.buildHmppModuleStructure(arguments: CommonComp
append("Files ") append("Files ")
append(commonFiles.joinToString(", ") { "'$it'" }) append(commonFiles.joinToString(", ") { "'$it'" })
} }
append(" can be a part of only one module, but is listed as a source for both `${m1.name}` and `${m2.name}`, please check you -Xmodule options.") append(
" can be a part of only one module, but is listed as a source for both `${m1.name}` and `${m2.name}`, " +
"please check you -Xfragment-sources options."
)
} }
reportError(message) reportError(message)
wasError = true wasError = true
@@ -233,7 +245,7 @@ private fun CompilerConfiguration.buildHmppModuleStructure(arguments: CommonComp
fun findModule(name: String): HmppCliModule? { fun findModule(name: String): HmppCliModule? {
return moduleByName[name].also { module -> return moduleByName[name].also { module ->
if (module == null) { if (module == null) {
reportError("Module `$name` not found in -Xmodule arguments") reportError("Module `$name` not found in -Xfragments arguments")
} }
} }
} }
+3 -2
View File
@@ -83,6 +83,9 @@ where advanced options include:
Use 'warning' level to issue warnings instead of errors. Use 'warning' level to issue warnings instead of errors.
-Xextended-compiler-checks Enable additional compiler checks that might provide verbose diagnostic information for certain errors. -Xextended-compiler-checks Enable additional compiler checks that might provide verbose diagnostic information for certain errors.
Warning: this mode is not backward-compatible and might cause compilation errors in previously compiled code. Warning: this mode is not backward-compatible and might cause compilation errors in previously compiled code.
-Xfragment-sources=<fragment name>;<path>
Adds sources to a specific fragment of a multiplatform compilation
-Xfragments=<fragment name> Declares all known fragments of a multiplatform compilation
-Xenable-incremental-compilation -Xenable-incremental-compilation
Enable incremental compilation Enable incremental compilation
-Xinference-compatibility Enable compatibility changes for generic type inference algorithm -Xinference-compatibility Enable compatibility changes for generic type inference algorithm
@@ -91,8 +94,6 @@ where advanced options include:
-Xlegacy-smart-cast-after-try Allow var smart casts despite assignment in try block -Xlegacy-smart-cast-after-try Allow var smart casts despite assignment in try block
-Xlist-phases List backend phases -Xlist-phases List backend phases
-Xmetadata-version Change metadata version of the generated binary files -Xmetadata-version Change metadata version of the generated binary files
-Xmodule=<module name>;<source file[,source file...]>
Describes module with specific sources. Usage of this arguments requires to specify module for each source file from free args
-Xmulti-platform Enable experimental language support for multi-platform projects -Xmulti-platform Enable experimental language support for multi-platform projects
-Xnew-inference Enable new experimental generic type inference algorithm -Xnew-inference Enable new experimental generic type inference algorithm
-Xno-check-actual Do not check presence of 'actual' modifier in multi-platform projects -Xno-check-actual Do not check presence of 'actual' modifier in multi-platform projects
+4 -3
View File
@@ -8,8 +8,9 @@ fir-hmpp
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/../jvm/hmpp/src/a.kt -Xfragments=a,b,c
-Xmodule=b;$TESTDATA_DIR$/../jvm/hmpp/src/b.kt -Xfragment-sources=a;$TESTDATA_DIR$/../jvm/hmpp/src/a.kt
-Xmodule=c;$TESTDATA_DIR$/../jvm/hmpp/src/c.kt -Xfragment-sources=b;$TESTDATA_DIR$/../jvm/hmpp/src/b.kt
-Xfragment-sources=c;$TESTDATA_DIR$/../jvm/hmpp/src/c.kt
-Xdepends-on=b\:a -Xdepends-on=b\:a
-Xdepends-on=c\:b -Xdepends-on=c\:b
+3 -2
View File
@@ -189,6 +189,9 @@ where advanced options include:
Use 'warning' level to issue warnings instead of errors. Use 'warning' level to issue warnings instead of errors.
-Xextended-compiler-checks Enable additional compiler checks that might provide verbose diagnostic information for certain errors. -Xextended-compiler-checks Enable additional compiler checks that might provide verbose diagnostic information for certain errors.
Warning: this mode is not backward-compatible and might cause compilation errors in previously compiled code. Warning: this mode is not backward-compatible and might cause compilation errors in previously compiled code.
-Xfragment-sources=<fragment name>;<path>
Adds sources to a specific fragment of a multiplatform compilation
-Xfragments=<fragment name> Declares all known fragments of a multiplatform compilation
-Xenable-incremental-compilation -Xenable-incremental-compilation
Enable incremental compilation Enable incremental compilation
-Xinference-compatibility Enable compatibility changes for generic type inference algorithm -Xinference-compatibility Enable compatibility changes for generic type inference algorithm
@@ -197,8 +200,6 @@ where advanced options include:
-Xlegacy-smart-cast-after-try Allow var smart casts despite assignment in try block -Xlegacy-smart-cast-after-try Allow var smart casts despite assignment in try block
-Xlist-phases List backend phases -Xlist-phases List backend phases
-Xmetadata-version Change metadata version of the generated binary files -Xmetadata-version Change metadata version of the generated binary files
-Xmodule=<module name>;<source file[,source file...]>
Describes module with specific sources. Usage of this arguments requires to specify module for each source file from free args
-Xmulti-platform Enable experimental language support for multi-platform projects -Xmulti-platform Enable experimental language support for multi-platform projects
-Xnew-inference Enable new experimental generic type inference algorithm -Xnew-inference Enable new experimental generic type inference algorithm
-Xno-check-actual Do not check presence of 'actual' modifier in multi-platform projects -Xno-check-actual Do not check presence of 'actual' modifier in multi-platform projects
+4 -3
View File
@@ -6,9 +6,10 @@ $TEMP_DIR$
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xfragments=a,b,c
-Xmodule=b;$TESTDATA_DIR$/src/b.kt -Xfragment-sources=a;$TESTDATA_DIR$/src/a.kt
-Xmodule=c;$TESTDATA_DIR$/src/c.kt -Xfragment-sources=b;$TESTDATA_DIR$/src/b.kt
-Xfragment-sources=c;$TESTDATA_DIR$/src/c.kt
-Xdepends-on=b\:a -Xdepends-on=b\:a
-Xdepends-on=c\:b -Xdepends-on=c\:b
-Xdepends-on=a\:c -Xdepends-on=a\:c
+2 -1
View File
@@ -4,5 +4,6 @@ $TEMP_DIR$
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xfragments=a
-Xfragment-sources=a;$TESTDATA_DIR$/src/a.kt
-Xdepends-on=b\:a -Xdepends-on=b\:a
@@ -8,5 +8,5 @@ as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk! compiler or generated code. Use it at your own risk!
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
error: there are multiple modules with same name(s): a, a error: -Xdepends-on flag can not be used without -Xfragments
COMPILATION_ERROR COMPILATION_ERROR
+1 -1
View File
@@ -8,5 +8,5 @@ as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk! compiler or generated code. Use it at your own risk!
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
error: -Xdepends-on flag can not be used without -Xmodule error: -Xdepends-on flag can not be used without -Xfragments
COMPILATION_ERROR COMPILATION_ERROR
@@ -5,4 +5,4 @@ $TEMP_DIR$
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;a.kt;b.kt -Xfragments=a,a
@@ -8,7 +8,6 @@ as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk! compiler or generated code. Use it at your own risk!
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
error: incorrect syntax for -Xmodule argument. `<module name>;<source file[,source file...]>` expected but got `a;a.kt;b.kt`
error: source '$TESTDATA_DIR$/src/a.kt' does not belong to any module error: source '$TESTDATA_DIR$/src/a.kt' does not belong to any module
error: source '$TESTDATA_DIR$/src/b.kt' does not belong to any module error: source '$TESTDATA_DIR$/src/b.kt' does not belong to any module
COMPILATION_ERROR COMPILATION_ERROR
-10
View File
@@ -1,10 +0,0 @@
$TESTDATA_DIR$/src/a.kt
$TESTDATA_DIR$/src/b.kt
-d
$TEMP_DIR$
-language-version
2.0
-XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/src/a.kt
-Xmodule=b;$TESTDATA_DIR$/src/b.kt
-Xmodule=a;$TESTDATA_DIR$/src/c.kt
@@ -5,4 +5,5 @@ $TEMP_DIR$
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xfragments=a,b,c
-Xfragment-sources=a;a.kt;
@@ -0,0 +1,14 @@
warning: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+MultiPlatformProjects
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
error: incorrect syntax for -Xfragment-sources argument. `<module name>;<source file>` expected but got `a;a.kt;`
error: source '$TESTDATA_DIR$/src/a.kt' does not belong to any module
error: source '$TESTDATA_DIR$/src/b.kt' does not belong to any module
COMPILATION_ERROR
@@ -4,5 +4,4 @@ $TEMP_DIR$
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a -Xfragments=a,b
-Xmodule=b;
+1 -2
View File
@@ -6,6 +6,5 @@ $TEMP_DIR$
-language-version -language-version
1.9 1.9
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xfragments=a,b,c
-Xmodule=b;$TESTDATA_DIR$/src/b.kt,$TESTDATA_DIR$/src/c.kt
-Xcommon-sources=$TESTDATA_DIR$/src/a.kt,$TESTDATA_DIR$/src/b.kt -Xcommon-sources=$TESTDATA_DIR$/src/a.kt,$TESTDATA_DIR$/src/b.kt
+1 -1
View File
@@ -7,5 +7,5 @@ This mode is not recommended for production use,
as no stability/compatibility guarantees are given on as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk! compiler or generated code. Use it at your own risk!
warning: -Xmodule flag is not supported for language version < 2.0 warning: -Xfragments flag is not supported for language version < 2.0
OK OK
@@ -5,6 +5,6 @@ $TEMP_DIR$
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xfragments=a,b
-Xmodule=b;$TESTDATA_DIR$/src/b.kt -Xfragment-sources=a;$TESTDATA_DIR$/src/a.kt,b;$TESTDATA_DIR$/src/b.kt
-Xdepends-on=c\:a -Xdepends-on=c\:a
@@ -8,5 +8,5 @@ as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk! compiler or generated code. Use it at your own risk!
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
error: module `c` not found in -Xmodule arguments error: module `c` not found in -Xfragments arguments
COMPILATION_ERROR COMPILATION_ERROR
@@ -0,0 +1,11 @@
$TESTDATA_DIR$/src/a.kt
$TESTDATA_DIR$/src/b.kt
-d
$TEMP_DIR$
-language-version
2.0
-XXLanguage\:+MultiPlatformProjects
-Xfragments=a,b
-Xfragment-sources=a;$TESTDATA_DIR$/src/a.kt
-Xfragment-sources=b;$TESTDATA_DIR$/src/a.kt
-Xfragment-sources=b;$TESTDATA_DIR$/src/b.kt
@@ -8,6 +8,5 @@ as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk! compiler or generated code. Use it at your own risk!
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
error: file '$TESTDATA_DIR$/src/a.kt' can be a part of only one module, but is listed as a source for both `a` and `b`, please check you -Xmodule options. error: file '$TESTDATA_DIR$/src/a.kt' can be a part of only one module, but is listed as a source for both `a` and `b`, please check you -Xfragment-sources options.
error: source '$TESTDATA_DIR$/src/b.kt' does not belong to any module
COMPILATION_ERROR COMPILATION_ERROR
@@ -5,5 +5,5 @@ $TEMP_DIR$
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xfragments=a,b
-Xmodule=b;$TESTDATA_DIR$/src/a.kt -Xfragment-sources=a;$TESTDATA_DIR$/src/a.kt
+6 -3
View File
@@ -6,8 +6,11 @@ $TEMP_DIR$
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/src/a.kt -Xfragments=a
-Xmodule=b;$TESTDATA_DIR$/src/b.kt -Xfragments=b
-Xmodule=c;$TESTDATA_DIR$/src/c.kt -Xfragments=c
-Xfragment-sources=a;$TESTDATA_DIR$/src/a.kt
-Xfragment-sources=b;$TESTDATA_DIR$/src/b.kt
-Xfragment-sources=c;$TESTDATA_DIR$/src/c.kt
-Xdepends-on=b\:a -Xdepends-on=b\:a
-Xdepends-on=c\:b -Xdepends-on=c\:b
@@ -0,0 +1,11 @@
$TESTDATA_DIR$/src/a.kt
$TESTDATA_DIR$/src/b.kt
$TESTDATA_DIR$/src/c.kt
-d
$TEMP_DIR$
-language-version
2.0
-XXLanguage\:+MultiPlatformProjects
-Xfragments=a,b,c
-Xfragment-sources=a;$TESTDATA_DIR$/src/a.kt,b;$TESTDATA_DIR$/src/b.kt,c;$TESTDATA_DIR$/src/c.kt
-Xdepends-on=b\:a,c\:b
@@ -0,0 +1,11 @@
warning: ATTENTION!
This build uses unsafe internal compiler arguments:
-XXLanguage:+MultiPlatformProjects
This mode is not recommended for production use,
as no stability/compatibility guarantees are given on
compiler or generated code. Use it at your own risk!
warning: language version 2.0 is experimental, there are no backwards compatibility guarantees for new language and library features
OK
+4 -3
View File
@@ -6,8 +6,9 @@ $TEMP_DIR$
-language-version -language-version
2.0 2.0
-XXLanguage\:+MultiPlatformProjects -XXLanguage\:+MultiPlatformProjects
-Xmodule=a;$TESTDATA_DIR$/../jvm/hmpp/src/a.kt -Xfragments=a,b,c
-Xmodule=b;$TESTDATA_DIR$/../jvm/hmpp/src/b.kt -Xfragment-sources=a;$TESTDATA_DIR$/../jvm/hmpp/src/a.kt
-Xmodule=c;$TESTDATA_DIR$/../jvm/hmpp/src/c.kt -Xfragment-sources=b;$TESTDATA_DIR$/../jvm/hmpp/src/b.kt
-Xfragment-sources=c;$TESTDATA_DIR$/../jvm/hmpp/src/c.kt
-Xdepends-on=b\:a -Xdepends-on=b\:a
-Xdepends-on=c\:b -Xdepends-on=c\:b
@@ -127,14 +127,24 @@ public class CliTestGenerated extends AbstractCliTest {
runTest("compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.args"); runTest("compiler/testData/cli/jvm/hmpp/dependsOnSingleModule.args");
} }
@TestMetadata("dependsOnWithoutModules.args") @TestMetadata("dependsOnWithoutFragments.args")
public void testDependsOnWithoutModules() throws Exception { public void testDependsOnWithoutFragments() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/dependsOnWithoutModules.args"); runTest("compiler/testData/cli/jvm/hmpp/dependsOnWithoutFragments.args");
} }
@TestMetadata("duplicatedModules.args") @TestMetadata("duplicatedFragments.args")
public void testDuplicatedModules() throws Exception { public void testDuplicatedFragments() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/duplicatedModules.args"); runTest("compiler/testData/cli/jvm/hmpp/duplicatedFragments.args");
}
@TestMetadata("fragmentSourcesIncorrectSyntax.args")
public void testFragmentSourcesIncorrectSyntax() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/fragmentSourcesIncorrectSyntax.args");
}
@TestMetadata("fragmentWithoutSources.args")
public void testFragmentWithoutSources() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/fragmentWithoutSources.args");
} }
@TestMetadata("lowLanguageVersion.args") @TestMetadata("lowLanguageVersion.args")
@@ -142,35 +152,30 @@ public class CliTestGenerated extends AbstractCliTest {
runTest("compiler/testData/cli/jvm/hmpp/lowLanguageVersion.args"); runTest("compiler/testData/cli/jvm/hmpp/lowLanguageVersion.args");
} }
@TestMetadata("missingModule.args") @TestMetadata("missingFragment.args")
public void testMissingModule() throws Exception { public void testMissingFragment() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/missingModule.args"); runTest("compiler/testData/cli/jvm/hmpp/missingFragment.args");
} }
@TestMetadata("moduleIncorrectSyntax.args") @TestMetadata("sameSourceInDifferentFragments.args")
public void testModuleIncorrectSyntax() throws Exception { public void testSameSourceInDifferentFragments() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/moduleIncorrectSyntax.args"); runTest("compiler/testData/cli/jvm/hmpp/sameSourceInDifferentFragments.args");
} }
@TestMetadata("moduleWithoutSources.args") @TestMetadata("sourceNotInAnyFragment.args")
public void testModuleWithoutSources() throws Exception { public void testSourceNotInAnyFragment() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/moduleWithoutSources.args"); runTest("compiler/testData/cli/jvm/hmpp/sourceNotInAnyFragment.args");
}
@TestMetadata("sameSourceInDifferentModules.args")
public void testSameSourceInDifferentModules() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/sameSourceInDifferentModules.args");
}
@TestMetadata("sourceNotInAnyModule.args")
public void testSourceNotInAnyModule() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/sourceNotInAnyModule.args");
} }
@TestMetadata("successfulCompilation.args") @TestMetadata("successfulCompilation.args")
public void testSuccessfulCompilation() throws Exception { public void testSuccessfulCompilation() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/successfulCompilation.args"); runTest("compiler/testData/cli/jvm/hmpp/successfulCompilation.args");
} }
@TestMetadata("successfulCompilation2.args")
public void testSuccessfulCompilation2() throws Exception {
runTest("compiler/testData/cli/jvm/hmpp/successfulCompilation2.args");
}
} }
@TestMetadata("compiler/testData/cli/jvm") @TestMetadata("compiler/testData/cli/jvm")