@@ -17,31 +17,29 @@ class MppProjectTest : BaseKotlinGradleTest() {
17
17
" :transformJvmMainAtomicfu" ,
18
18
" :transformJvmTestAtomicfu" ,
19
19
" :compileKotlinJs" ,
20
- " :compileTestKotlinJs" ,
21
- " :transformJsMainAtomicfu" ,
22
- " :transformJsTestAtomicfu"
20
+ " :transformJsMainAtomicfu"
23
21
)
24
22
25
23
build(" build" ) {
26
24
checkOutcomes(TaskOutcome .SUCCESS , * tasksToCheck)
27
25
28
26
fun checkPlatform (platform : String , fileInMainName : String ) {
27
+ val isJs = platform == " js"
29
28
val testCompileClasspathFiles = projectDir.resolve(" build/classpath/$platform /test_compile.txt" )
30
29
.readLines().asSequence().flatMapTo(HashSet ()) { File (it).walk().filter(File ::isFile) }
31
-
32
- val testRuntimeClasspathFiles = projectDir.resolve(" build/classpath/$platform /test_runtime.txt" )
30
+ val testRuntimeClasspathFiles = if (isJs) emptySet<File >() else projectDir.resolve(" build/classpath/$platform /test_runtime.txt" )
33
31
.readLines().asSequence().flatMapTo(HashSet ()) { File (it).walk().filter(File ::isFile) }
34
32
35
33
projectDir.resolve(" build/classes/kotlin/$platform /main/$fileInMainName " ).let {
36
34
it.checkExists()
37
35
check(it in testCompileClasspathFiles) { " Original '$it ' is missing from $platform test compile classpath" }
38
- check(it in testRuntimeClasspathFiles) { " Original '$it ' is missing from $platform test runtime classpath" }
36
+ if ( ! isJs) check(it in testRuntimeClasspathFiles) { " Original '$it ' is missing from $platform test runtime classpath" }
39
37
}
40
38
41
39
projectDir.resolve(" build/classes/atomicfu/jvm/main/IntArithmetic.class" ).let {
42
40
it.checkExists()
43
41
check(it !in testCompileClasspathFiles) { " Transformed '$it ' is present in $platform test compile classpath" }
44
- check(it !in testRuntimeClasspathFiles) { " Transformed '$it ' is present in $platform test runtime classpath" }
42
+ if ( ! isJs) check(it !in testRuntimeClasspathFiles) { " Transformed '$it ' is present in $platform test runtime classpath" }
45
43
}
46
44
47
45
}
0 commit comments