Skip to content

Commit 43c2875

Browse files
committed
test and lint fixes
1 parent 71e92f1 commit 43c2875

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

Source/ios-framework/CommonSource/Relation/ToMany.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,7 @@ extension ToMany: RangeReplaceableCollection {
356356
}
357357

358358
public func replaceSubrange<C, R>(_ subrange: R, with newElements: __owned C)
359-
where C: Collection, R: RangeExpression, ReferencedType == C.Element, Index == R.Bound
360-
{
359+
where C: Collection, R: RangeExpression, ReferencedType == C.Element, Index == R.Bound {
361360
relationCacheLock.wait()
362361
defer { relationCacheLock.signal() }
363362
if resolverAndCollection.collection.isEmpty && newElements.isEmpty { return }
@@ -428,7 +427,7 @@ extension ToMany {
428427
/// Helper object to provide custom comparison to entities based on ID,
429428
/// so we can keep a Set of entities.
430429
struct IdComparableReferencedType: Hashable, Comparable {
431-
static func <(lhs: ToMany<S>.IdComparableReferencedType, rhs: ToMany<S>.IdComparableReferencedType) -> Bool {
430+
static func < (lhs: ToMany<S>.IdComparableReferencedType, rhs: ToMany<S>.IdComparableReferencedType) -> Bool {
432431
return lhs.entityId < rhs.entityId
433432
}
434433

Source/ios-framework/CommonTests/StoreTests.swift

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,18 @@ class StoreTests: XCTestCase {
4747
print("Testing", Store.versionFullInfo) // Actually print it so we see the used versions in the logs
4848
// Update the expected versions every now and then...
4949
XCTAssertGreaterThanOrEqual(Store.version, "1.3.1")
50-
XCTAssertGreaterThanOrEqual(Store.versionLib, "0.8.2")
51-
XCTAssertGreaterThanOrEqual(Store.versionCore, "2.6.0")
50+
XCTAssertGreaterThanOrEqual(Store.versionLib, "0.8.100")
51+
XCTAssertGreaterThanOrEqual(Store.versionCore, "2.6.1")
5252
}
5353

5454
func test32vs64BitForOs() {
55-
let is64Bit = Store.versionFullInfo.contains("64 bit")
56-
let is32Bit = Store.versionFullInfo.contains("32 bit")
55+
let isChunked = Store.versionFullInfo.contains("chunk")
5756
#if os(iOS)
5857
print("Hello iOS")
59-
XCTAssert(is32Bit)
60-
XCTAssert(!is64Bit)
58+
XCTAssert(isChunked)
6159
#else
6260
print("Hello macOS")
63-
XCTAssert(!is32Bit)
64-
XCTAssert(is64Bit)
61+
XCTAssert(!isChunked)
6562
#endif
6663
}
6764

Source/ios-framework/CommonTests/Test Entities/IntTestiOSRegular-Entities.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Author {
6363

6464
// objectbox: backlink = "author"
6565
var notes: ToMany<Note>
66-
var yearOfBirth: UInt16? = nil
66+
var yearOfBirth: UInt16?
6767

6868

6969
// An initializer with no parameters is required by ObjectBox

0 commit comments

Comments
 (0)