Skip to content

Commit

Permalink
[klib] Fix klib printer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ilmat192 committed May 10, 2018
1 parent 8121e83 commit 50a8ff2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions klib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,11 @@ test {
dependsOn 'cleanTest'
systemProperty('konan.home', getProperty("konan.home"))
dependsOn konanArtifacts.collect { it.getByTarget('host') }
if (useCustomDist) {
// Use the klib utility from the distribution
def distClasspath = fileTree("${project.getProperty("konan.home")}/konan/lib") {
include "**/*.jar"
}
classpath = distClasspath + sourceSets.test.runtimeClasspath - sourceSets.main.runtimeClasspath
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

package org.jetbrains.kotlin.cli.klib.test

import com.intellij.openapi.util.text.StringUtil
import kotlin.test.*
import org.jetbrains.kotlin.cli.klib.*
import org.jetbrains.kotlin.konan.target.Distribution
import org.jetbrains.kotlin.konan.target.HostManager
import org.jetbrains.kotlin.preprocessor.convertLineSeparators
import java.nio.file.Paths

class ContentsTest {
Expand All @@ -35,8 +35,8 @@ class ContentsTest {
println(output.trim().toString())
}
assertEquals(
expected().convertLineSeparators(),
output.trim().toString().convertLineSeparators(),
StringUtil.convertLineSeparators(expected()),
StringUtil.convertLineSeparators(output.trim().toString()),
"klib contents test failed for library: $library"
)
}
Expand Down

0 comments on commit 50a8ff2

Please sign in to comment.