tests: Add assert tests
This commit is contained in:
@@ -38,6 +38,7 @@ abstract class KonanTest extends JavaExec {
|
||||
def konanc = new File("${dist.canonicalPath}/bin/$konancDriver").absolutePath
|
||||
def mainC = 'main.c'
|
||||
def outputSourceSetName = "testOutputLocal"
|
||||
def enableKonanAssertions = true
|
||||
String outputDirectory = null
|
||||
String goldValue = null
|
||||
String testData = null
|
||||
@@ -97,13 +98,15 @@ abstract class KonanTest extends JavaExec {
|
||||
classpath = project.configurations.cli_bc
|
||||
enableAssertions = true
|
||||
args = ["-output", output,
|
||||
"-ea",
|
||||
*filesToCompile,
|
||||
*moreArgs,
|
||||
*project.globalTestArgs]
|
||||
if (project.testTarget) {
|
||||
args "-target", project.testTarget
|
||||
}
|
||||
if (enableKonanAssertions) {
|
||||
args "-ea"
|
||||
}
|
||||
standardOutput = log
|
||||
errorOutput = log
|
||||
super.exec()
|
||||
@@ -282,13 +285,15 @@ class RunDriverKonanTest extends KonanTest {
|
||||
project.exec {
|
||||
commandLine konanc
|
||||
args = ["-output", output,
|
||||
"-ea",
|
||||
*filesToCompile,
|
||||
*moreArgs,
|
||||
*project.globalTestArgs]
|
||||
if (project.testTarget) {
|
||||
args "-target", project.testTarget
|
||||
}
|
||||
if (enableKonanAssertions) {
|
||||
args "-ea"
|
||||
}
|
||||
standardOutput = log
|
||||
errorOutput = log
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user