tests: Add assert tests

This commit is contained in:
Ilya Matveev
2017-07-24 15:41:06 +07:00
committed by ilmat192
parent a2e9fa324b
commit 0e67fbb7ad
4 changed files with 23 additions and 4 deletions
@@ -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
}