Tests fixed after visibility changing
This commit is contained in:
@@ -70,7 +70,7 @@ class Luhny() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun printAll() {
|
||||
fun printAll() {
|
||||
while (!buffer.isEmpty())
|
||||
print(buffer.removeFirst())
|
||||
digits.clear()
|
||||
|
||||
@@ -6,13 +6,13 @@ package example;
|
||||
fun test() {
|
||||
val p = test.Public()
|
||||
if (p.public is Int) <!AUTOCAST_IMPOSSIBLE!>p.public<!> + 1
|
||||
if (p.protected is Int) <!AUTOCAST_IMPOSSIBLE!>p.protected<!> + 1
|
||||
if (p.i_protected is Int) p.i_protected + 1
|
||||
if (p.<!UNRESOLVED_REFERENCE!>protected<!> is Int) p.<!UNRESOLVED_REFERENCE!>protected<!> + 1
|
||||
if (p.<!UNRESOLVED_REFERENCE!>i_protected<!> is Int) p.<!UNRESOLVED_REFERENCE!>i_protected<!> + 1
|
||||
if (p.internal is Int) p.internal + 1
|
||||
val i = test.Public()
|
||||
if (i.public is Int) <!AUTOCAST_IMPOSSIBLE!>i.public<!> + 1
|
||||
if (i.protected is Int) <!AUTOCAST_IMPOSSIBLE!>i.protected<!> + 1
|
||||
if (i.i_protected is Int) i.i_protected + 1
|
||||
if (i.<!UNRESOLVED_REFERENCE!>protected<!> is Int) i.<!UNRESOLVED_REFERENCE!>protected<!> + 1
|
||||
if (i.<!UNRESOLVED_REFERENCE!>i_protected<!> is Int) i.<!UNRESOLVED_REFERENCE!>i_protected<!> + 1
|
||||
if (i.internal is Int) i.internal + 1
|
||||
}
|
||||
|
||||
@@ -30,5 +30,4 @@ internal class Internal() {
|
||||
protected val protected : Int? = 1;
|
||||
internal protected val i_protected : Int? = 1;
|
||||
val internal : Int? = 1
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
// this test checks it does it properly
|
||||
|
||||
trait Foo<P> {
|
||||
fun quux(p: P, q: Int = 17) = 18
|
||||
fun quux(p: P, q: Int = 17) : Int = 18
|
||||
}
|
||||
|
||||
trait Bar<Q> : Foo<Q>
|
||||
|
||||
@@ -78,18 +78,6 @@ public class PropertyGenTest extends CodegenTestCase {
|
||||
assertEquals(239, field.get(null));
|
||||
}
|
||||
|
||||
public void testProtectedPropertyInNamespace() throws Exception {
|
||||
loadText("protected val x : Int = 239");
|
||||
final Class nsClass = generateNamespaceClass();
|
||||
final Field[] fields = nsClass.getDeclaredFields();
|
||||
assertEquals(1, fields.length);
|
||||
final Field field = fields[0];
|
||||
field.setAccessible(true);
|
||||
assertEquals("x", field.getName());
|
||||
assertEquals(Modifier.PROTECTED | Modifier.STATIC | Modifier.FINAL, field.getModifiers());
|
||||
assertEquals(239, field.get(null));
|
||||
}
|
||||
|
||||
public void testFieldPropertyAccess() throws Exception {
|
||||
loadFile("properties/fieldPropertyAccess.jet");
|
||||
// System.out.println(generateToText());
|
||||
|
||||
@@ -664,9 +664,8 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
@Override
|
||||
public Set<FunctionDescriptor> getFunctions(@NotNull String name) {
|
||||
Set<FunctionDescriptor> writableFunctionGroup = Sets.newLinkedHashSet();
|
||||
ModuleDescriptor module = new ModuleDescriptor("TypeCheckerTest");
|
||||
for (String funDecl : FUNCTION_DECLARATIONS) {
|
||||
FunctionDescriptor functionDescriptor = descriptorResolver.resolveFunctionDescriptor(module, this, JetPsiFactory.createFunction(getProject(), funDecl), JetTestUtils.DUMMY_TRACE);
|
||||
FunctionDescriptor functionDescriptor = descriptorResolver.resolveFunctionDescriptor(this.getContainingDeclaration(), this, JetPsiFactory.createFunction(getProject(), funDecl), JetTestUtils.DUMMY_TRACE);
|
||||
if (name.equals(functionDescriptor.getName())) {
|
||||
writableFunctionGroup.add(functionDescriptor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user