diff --git a/uikit/CSSLayout/BUCK b/uikit/CSSLayout/BUCK index 1167a8b6..2cf62657 100644 --- a/uikit/CSSLayout/BUCK +++ b/uikit/CSSLayout/BUCK @@ -9,10 +9,29 @@ include_defs('//CSSLAYOUT_DEFS') apple_library( name = 'CSSLayout', + tests = [':CSSLayoutTests'], srcs = glob(['*.m']), exported_headers = glob(['*.h']), + frameworks = [ + '$SDKROOT/System/Library/Frameworks/Foundation.framework', + '$SDKROOT/System/Library/Frameworks/UIKit.framework', + ], deps = [ csslayout_dep(':CSSLayout'), ], visibility = ['PUBLIC'], ) + +apple_test( + name = 'CSSLayoutTests', + info_plist = 'Tests/Info.plist', + srcs = glob(['Tests/**/*.m']), + frameworks = [ + '$SDKROOT/System/Library/Frameworks/CoreGraphics.framework', + '$PLATFORM_DIR/Developer/Library/Frameworks/XCTest.framework', + ], + deps = [ + ':CSSLayout', + ], + visibility = ['PUBLIC'], +) diff --git a/uikit/CSSLayout/Tests/CSSLayoutTests.m b/uikit/CSSLayout/Tests/CSSLayoutTests.m new file mode 100644 index 00000000..08a71416 --- /dev/null +++ b/uikit/CSSLayout/Tests/CSSLayoutTests.m @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import "UIView+CSSLayout.h" + +@interface CSSLayoutTests : XCTestCase +@end + +@implementation CSSLayoutTests + +- (void)testSmoke +{ + UIView *view = [[UIView alloc] initWithFrame:CGRectZero]; + [view css_setUsesFlexbox:YES]; + XCTAssertTrue([view css_usesFlexbox]); +} + +@end diff --git a/uikit/CSSLayout/Tests/Info.plist b/uikit/CSSLayout/Tests/Info.plist new file mode 100644 index 00000000..c317ef52 --- /dev/null +++ b/uikit/CSSLayout/Tests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + com.facebook.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + +