Workaround in FloatMathTest.powers to avoid failures with js-ir runtime
Include kotlin-stdlib-js-ir in local core libs build/test and enable failing build on test failures. Relates to: KT-24975
This commit is contained in:
+1
-3
@@ -251,9 +251,7 @@ val coreLibProjects = listOfNotNull(
|
||||
":kotlin-stdlib",
|
||||
":kotlin-stdlib-common",
|
||||
":kotlin-stdlib-js",
|
||||
// Local builds are disabled at the request of the lib team
|
||||
// TODO: Enable when tests are fixed
|
||||
":kotlin-stdlib-js-ir".takeIf { isTeamcityBuild },
|
||||
":kotlin-stdlib-js-ir",
|
||||
":kotlin-stdlib-jdk7",
|
||||
":kotlin-stdlib-jdk8",
|
||||
":kotlin-test:kotlin-test-common",
|
||||
|
||||
@@ -193,9 +193,7 @@ task runMocha(type: NodeTask) {
|
||||
args += [testOutputFile, kotlinTestTestOutputFile]
|
||||
|
||||
execOverrides {
|
||||
// Tests are currently failing. Ignore the exit value for now
|
||||
// TODO: replace with rootProject.ignoreTestFailures when tests are fixed
|
||||
it.ignoreExitValue = true
|
||||
it.ignoreExitValue = rootProject.ignoreTestFailures
|
||||
it.workingDir = buildDir
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,6 +361,15 @@ class FloatMathTest {
|
||||
const val E = kotlin.math.E.toFloat()
|
||||
}
|
||||
|
||||
// TODO: ensure it passes in kotlin-stdlib-js-ir after implementing KT-24975
|
||||
@Ignore
|
||||
@Test
|
||||
fun floatRangeConversion() {
|
||||
// expected run-time conversion to produce the same result as compile-time one
|
||||
assertEquals(kotlin.math.E.toFloat(), E)
|
||||
assertEquals(kotlin.math.PI.toFloat(), PI)
|
||||
}
|
||||
|
||||
@Test fun trigonometric() {
|
||||
assertEquals(0.0F, sin(0.0F))
|
||||
assertAlmostEquals(0.0F, sin(PI))
|
||||
@@ -480,7 +489,7 @@ class FloatMathTest {
|
||||
assertTrue(sqrt(Float.NaN).isNaN())
|
||||
|
||||
assertTrue(exp(Float.NaN).isNaN())
|
||||
assertAlmostEquals(E, exp(1.0F))
|
||||
assertAlmostEquals(kotlin.math.E.toFloat(), exp(1.0F))
|
||||
assertEquals(1.0F, exp(0.0F))
|
||||
assertEquals(0.0F, exp(Float.NEGATIVE_INFINITY))
|
||||
assertEquals(Float.POSITIVE_INFINITY, exp(Float.POSITIVE_INFINITY))
|
||||
|
||||
Reference in New Issue
Block a user