Add Testing to uikit.
Summary: I'm going to make some changes, but first, I want to get testing setup. Reviewed By: rnystrom Differential Revision: D4022585 fbshipit-source-id: a48516faad0bcb1a9cf5610ab21da5ee099c6f16
This commit is contained in:
committed by
Facebook Github Bot
parent
832d07902e
commit
89440f630f
@@ -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'],
|
||||
)
|
||||
|
26
uikit/CSSLayout/Tests/CSSLayoutTests.m
Normal file
26
uikit/CSSLayout/Tests/CSSLayoutTests.m
Normal file
@@ -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 <XCTest/XCTest.h>
|
||||
|
||||
#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
|
22
uikit/CSSLayout/Tests/Info.plist
Normal file
22
uikit/CSSLayout/Tests/Info.plist
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.facebook.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
Reference in New Issue
Block a user