Add Test to make sure associated objects live/die with lifetime of UIView.

Summary: Wrote some tests to make sure the associated objects we use for layout live and die with the objects. This was worthwhile because it made me realize UIView+CSSLayout wasn't enabled to ARC. As a result, my tests were failing because they weren't explicitly deallocing nodes.

Reviewed By: rnystrom

Differential Revision: D4023324

fbshipit-source-id: 5356cf4f0522582d75f83b5eb2193d9bc8d63aee
This commit is contained in:
Dustin Shahidehpour
2016-10-14 14:52:22 -07:00
committed by Facebook Github Bot
parent 0254e3e97f
commit eedee80f25
3 changed files with 34 additions and 1 deletions

View File

@@ -7,8 +7,11 @@
include_defs('//CSSLAYOUT_DEFS')
UIKIT_CSSLAYOUT_COMPILER_FLAGS = ['-fobjc-arc']
apple_library(
name = 'CSSLayout',
compiler_flags = UIKIT_CSSLAYOUT_COMPILER_FLAGS,
tests = [':CSSLayoutTests'],
srcs = glob(['*.m']),
exported_headers = glob(['*.h']),
@@ -24,6 +27,7 @@ apple_library(
apple_test(
name = 'CSSLayoutTests',
compiler_flags = UIKIT_CSSLAYOUT_COMPILER_FLAGS,
info_plist = 'Tests/Info.plist',
srcs = glob(['Tests/**/*.m']),
frameworks = [