mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-03-26 19:31:13 +01:00
fix warnings
This commit is contained in:
@@ -254,36 +254,4 @@
|
|||||||
[self waitForExpectationsWithTimeout:10 handler:nil];
|
[self waitForExpectationsWithTimeout:10 handler:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_OS_IOS || TARGET_OS_WATCHOS || TARGET_OS_TV
|
|
||||||
|
|
||||||
- (void)test_ThatDataStacks_CanCreateCustomFetchedResultsControllers {
|
|
||||||
|
|
||||||
[CSCoreStore
|
|
||||||
setDefaultStack:[[CSDataStack alloc]
|
|
||||||
initWithModelName:@"Model"
|
|
||||||
bundle:[NSBundle bundleForClass:[self class]]
|
|
||||||
versionChain:nil]];
|
|
||||||
[CSCoreStore
|
|
||||||
addInMemoryStorageAndWait:[CSInMemoryStore new]
|
|
||||||
error:nil];
|
|
||||||
NSFetchedResultsController *controller =
|
|
||||||
[[CSCoreStore defaultStack]
|
|
||||||
createFetchedResultsControllerFrom:CSFromClass([TestEntity1 class])
|
|
||||||
sectionBy:[CSSectionBy keyPath:CSKeyPath(TestEntity1, testString)]
|
|
||||||
fetchClauses:@[CSWhereFormat(@"%K > %d", CSKeyPath(TestEntity1, testEntityID), 100),
|
|
||||||
CSOrderByKeys(CSSortAscending(CSKeyPath(TestEntity1, testString)), nil),
|
|
||||||
CSTweakRequest(^(NSFetchRequest *fetchRequest) { fetchRequest.fetchLimit = 10; })]];
|
|
||||||
|
|
||||||
XCTAssertNotNil(controller);
|
|
||||||
XCTAssertEqualObjects(controller.fetchRequest.entity.managedObjectClassName, [[TestEntity1 class] description]);
|
|
||||||
XCTAssertEqualObjects(controller.sectionNameKeyPath, CSKeyPath(TestEntity1, testString));
|
|
||||||
XCTAssertEqualObjects(controller.fetchRequest.predicate,
|
|
||||||
CSWhereFormat(@"%K > %d", CSKeyPath(TestEntity1, testEntityID), 100).predicate);
|
|
||||||
XCTAssertEqualObjects(controller.fetchRequest.sortDescriptors,
|
|
||||||
CSOrderByKeys(CSSortAscending(CSKeyPath(TestEntity1, testString)), nil).sortDescriptors);
|
|
||||||
XCTAssertEqual(controller.fetchRequest.fetchLimit, 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ extension Entity: CustomDebugStringConvertible, CoreStoreDebugStringConvertible
|
|||||||
("type", self.type),
|
("type", self.type),
|
||||||
("entityName", self.entityName),
|
("entityName", self.entityName),
|
||||||
("isAbstract", self.isAbstract),
|
("isAbstract", self.isAbstract),
|
||||||
("versionHashModifier", self.versionHashModifier)
|
("versionHashModifier", self.versionHashModifier as Any)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user