Antoine Gagnon
02/24/2020, 3:26 PMclass MathTest {
@Test
fun test_should_fail_function() {
assert(2.0.pow(24) == 2.0)
}
}
In my build.gradle I have these imports:
// Android Instrumentation
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation "org.jetbrains.kotlin:kotlin-test-common:$kotlin_version"
androidTestImplementation "de.mannodermaus.junit5:android-test-core:1.0.0"
androidTestRuntimeOnly "de.mannodermaus.junit5:android-test-runner:1.0.0"
Any idea what could be making all of them succeed ?robstoll
02/24/2020, 4:52 PMDaniel
02/24/2020, 7:47 PMassert
from? Best try assertThat() from assertJ or JUnit. Maybe there is a wrong exception trhown which somehow interferec with the JUnit framework. Also maybe there is no test runner specified?Antoine Gagnon
02/27/2020, 7:31 PM