Switch class loading logic in blackBoxWithJava tests
BoxWithJava tests now by default are loaded with the classloader which has test's classpath in itself, as in the former ClassPathInTheSameClassLoaderTest
This commit is contained in:
committed by
Alexander Udalov
parent
22bf8b25b8
commit
b485c7ae26
@@ -0,0 +1,9 @@
|
||||
import java.lang.String;
|
||||
|
||||
class J {
|
||||
String value;
|
||||
|
||||
J(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
fun box() = J("OK").value
|
||||
@@ -0,0 +1,9 @@
|
||||
package protectedPack;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
class packageClass {
|
||||
public String test() {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package protectedPack
|
||||
|
||||
fun box(): String {
|
||||
return packageClass().test()!!
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package protectedPack;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
public class packageFun {
|
||||
String test() {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package protectedPack
|
||||
|
||||
fun box(): String {
|
||||
return packageFun().test()!!
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package protectedPack;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
public class packageProperty {
|
||||
String test = "OK";
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package protectedPack
|
||||
|
||||
fun box(): String {
|
||||
return packageProperty().test!!
|
||||
}
|
||||
Reference in New Issue
Block a user