mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 03:40:18 +00:00
Fix unit tests
This commit is contained in:
parent
e9708633bc
commit
d9ea1b52ea
@ -91,15 +91,15 @@
|
|||||||
{
|
{
|
||||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||||
ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||||
XCTAssert(collectionView.layoutDelegate != nil, @"should automatically set a layout delegate for flow layouts");
|
XCTAssert(collectionView.layoutInspector != nil, @"should automatically set a layout delegate for flow layouts");
|
||||||
XCTAssert([collectionView.layoutDelegate isKindOfClass:[ASCollectionViewFlowLayoutInspector class]], @"should have a flow layout inspector by default");
|
XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewFlowLayoutInspector class]], @"should have a flow layout inspector by default");
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testThatItDoesNotSetALayoutInspectorForCustomLayouts
|
- (void)testThatItDoesNotSetALayoutInspectorForCustomLayouts
|
||||||
{
|
{
|
||||||
UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init];
|
UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init];
|
||||||
ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||||
XCTAssert(collectionView.layoutDelegate == nil, @"should not set a layout delegate for custom layouts");
|
XCTAssert(collectionView.layoutInspector == nil, @"should not set a layout delegate for custom layouts");
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)testThatRegisteringASupplementaryNodeStoresItForIntrospection
|
- (void)testThatRegisteringASupplementaryNodeStoresItForIntrospection
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user