Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class KotlinSchemaTests {
// We cannot enforce this constraint inside the schema right now.
// If people maintain the variant themselves they need a custom getter
// assertTrue(objSchema.isNullable(AllKotlinTypes::nonNullObject.name));

assertFalse(objSchema.isNullable("privateNonNullString"));
}

@Test
Expand All @@ -81,6 +83,7 @@ class KotlinSchemaTests {
assertTrue(objSchema.isNullable(AllKotlinTypes::nullFloat.name));
assertFalse(objSchema.isNullable(AllKotlinTypes::nullList.name)); // Managed realm objects do not allow null lists
assertTrue(objSchema.isNullable(AllKotlinTypes::nullObject.name));
assertTrue(objSchema.isNullable("privateNullString"));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,10 @@ class SyncedRealmTests {
RealmFieldType.TYPED_LINK, // Not an actual exposed type, it is used internally by RealmAny
RealmFieldType.FLOAT, // Float is not cloud compatible yet
RealmFieldType.FLOAT_LIST, // Float is not cloud compatible yet
RealmFieldType.FLOAT_SET,
RealmFieldType.STRING_TO_FLOAT_MAP // Float is not cloud compatible yet
-> {}

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ open class AllKotlinTypes : RealmObject() {

@LinkingObjects("nonNullList")
val listParents: RealmResults<AllKotlinTypes>? = null;

private var privateNonNullString: String = "";
private var privateNullString: String? = "";
}

open class WithRealmAnyTestEntity(
Expand Down