Fixed unit tests

Reviewed By: bestander

Differential Revision: D3399766

fbshipit-source-id: ebc72a9d02ff812eccae13efc1492d2fec3f95c3
This commit is contained in:
Nick Lockwood 2016-06-07 12:33:58 -07:00 committed by Facebook Github Bot 7
parent 39eca05b91
commit 26a5b033f8
3 changed files with 10 additions and 0 deletions

View File

@ -73,6 +73,8 @@
removeAtIndices:nil
registry:(NSMutableDictionary<NSNumber *, id<RCTComponent>> *)_uiManager.viewRegistry];
[_uiManager.viewRegistry[@20] didUpdateReactSubviews];
XCTAssertTrue([[containerView reactSubviews] count] == 5,
@"Expect to have 5 react subviews after calling manage children \
with 5 tags to add, instead have %lu", (unsigned long)[[containerView reactSubviews] count]);
@ -107,6 +109,8 @@
removeAtIndices:removeAtIndices
registry:(NSMutableDictionary<NSNumber *, id<RCTComponent>> *)_uiManager.viewRegistry];
[_uiManager.viewRegistry[@20] didUpdateReactSubviews];
XCTAssertEqual(containerView.reactSubviews.count, (NSUInteger)13,
@"Expect to have 13 react subviews after calling manage children\
with 5 tags to remove and 18 prior children, instead have %zd",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 153 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View File

@ -73,6 +73,8 @@
removeAtIndices:nil
registry:_uiManager.viewRegistry];
[containerView didUpdateReactSubviews];
XCTAssertTrue([[containerView reactSubviews] count] == 5,
@"Expect to have 5 react subviews after calling manage children \
with 5 tags to add, instead have %lu", (unsigned long)[[containerView reactSubviews] count]);
@ -107,6 +109,8 @@
removeAtIndices:removeAtIndices
registry:_uiManager.viewRegistry];
[containerView didUpdateReactSubviews];
XCTAssertEqual(containerView.reactSubviews.count, (NSUInteger)13,
@"Expect to have 13 react subviews after calling manage children\
with 5 tags to remove and 18 prior children, instead have %zd",
@ -166,6 +170,8 @@
removeAtIndices:removeAtIndices
registry:_uiManager.viewRegistry];
[containerView didUpdateReactSubviews];
XCTAssertTrue([[containerView reactSubviews] count] == 8,
@"Expect to have 8 react subviews after calling manage children,\
instead have the following subviews %@", [containerView reactSubviews]);