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
+9
@@ -0,0 +1,9 @@
|
||||
package protectedPack;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
public class overrideProtectedFunInPackage {
|
||||
protected String foo() {
|
||||
return "fail";
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package protectedPackKotlin
|
||||
|
||||
import protectedPack.overrideProtectedFunInPackage
|
||||
|
||||
class Derived: overrideProtectedFunInPackage() {
|
||||
protected override fun foo(): String? {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
fun test(): String {
|
||||
return foo()!!
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return Derived().test()
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package protectedPack;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
public class protectedFunInPackage {
|
||||
protected String foo() {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package protectedPack
|
||||
|
||||
fun box(): String {
|
||||
return protectedFunInPackage().foo()!!
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package protectedPack;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
public class protectedPropertyInPackage {
|
||||
protected String foo = "OK";
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package protectedPack
|
||||
|
||||
fun box(): String {
|
||||
return protectedPropertyInPackage().foo!!
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package protectedPack;
|
||||
|
||||
import java.lang.String;
|
||||
|
||||
public class protectedStaticClass {
|
||||
protected static class Inner {
|
||||
public String foo() {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package protectedPack
|
||||
|
||||
class Derived(): protectedStaticClass() {
|
||||
fun test(): String {
|
||||
return protectedStaticClass.Inner().foo()!!
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return Derived().test()
|
||||
}
|
||||
Reference in New Issue
Block a user