Repository: incubator-weex Updated Branches: refs/heads/0.16-dev 61abcdc37 -> 16290bff1
* [test] fix iOS Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8178f606 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8178f606 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8178f606 Branch: refs/heads/0.16-dev Commit: 8178f60604400351b5f9ce5a46a2291112724184 Parents: 55bc091 Author: gurisxie <279483...@qq.com> Authored: Wed Aug 23 15:05:50 2017 +0800 Committer: gurisxie <279483...@qq.com> Committed: Wed Aug 23 15:05:50 2017 +0800 ---------------------------------------------------------------------- ios/playground/WeexDemoTests/Info.plist | 28 ------ .../WeexDemoTests/WXFloatCompareTests.m | 93 ++++++++++++++++++++ ios/playground/WeexDemoTests/WeexDemoTests.m | 50 ----------- test/run.sh | 2 +- 4 files changed, 94 insertions(+), 79 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8178f606/ios/playground/WeexDemoTests/Info.plist ---------------------------------------------------------------------- diff --git a/ios/playground/WeexDemoTests/Info.plist b/ios/playground/WeexDemoTests/Info.plist deleted file mode 100644 index 57c21c9..0000000 --- a/ios/playground/WeexDemoTests/Info.plist +++ /dev/null @@ -1,28 +0,0 @@ -<?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>NSLocationWhenInUseUsageDescription</key> - <string>$(PRODUCT_NAME) will access your location</string> - <key>NSCameraUsageDescription</key> - <string>$(PRODUCT_NAME) will access your camera</string> - <key>CFBundleDevelopmentRegion</key> - <string>en</string> - <key>CFBundleExecutable</key> - <string>$(EXECUTABLE_NAME)</string> - <key>CFBundleIdentifier</key> - <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> - <key>CFBundleInfoDictionaryVersion</key> - <string>6.0</string> - <key>CFBundleName</key> - <string>$(PRODUCT_NAME)</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> http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8178f606/ios/playground/WeexDemoTests/WXFloatCompareTests.m ---------------------------------------------------------------------- diff --git a/ios/playground/WeexDemoTests/WXFloatCompareTests.m b/ios/playground/WeexDemoTests/WXFloatCompareTests.m new file mode 100644 index 0000000..261699b --- /dev/null +++ b/ios/playground/WeexDemoTests/WXFloatCompareTests.m @@ -0,0 +1,93 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#import <XCTest/XCTest.h> +#import "WXUtility.h" + +@interface WXFloatCompareTests : XCTestCase + +@end + +@implementation WXFloatCompareTests + +- (void)setUp { + [super setUp]; + // Put setup code here. This method is called before the invocation of each test method in the class. +} + +- (void)tearDown { + // Put teardown code here. This method is called after the invocation of each test method in the class. + [super tearDown]; +} + +- (void)testWXFloatEqual { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + float a = 0.1; + double b = 0.1; + BOOL boolval = WXFloatEqual(a, b); + XCTAssertTrue(boolval); +} + +- (void)testWXFloatEqualWithPrecision { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + float a = 0.1; + double b = 0.1; + BOOL boolval = WXFloatEqualWithPrecision(a, b , 0.01); + XCTAssertTrue(boolval); +} + +- (void)testWXFloatLessThan { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + float a = 0.1; + double b = 0.2; + BOOL boolval = WXFloatLessThan(a, b); + XCTAssertTrue(boolval); +} + +- (void)testWXFloatLessThanWithPrecision { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + float a = 0.1; + double b = 0.2; + BOOL boolval = WXFloatLessThanWithPrecision(a, b, 0.01); + XCTAssertTrue(boolval); +} + +- (void)testWXFloatGreaterThan { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + float a = 0.2; + double b = 0.1; + BOOL boolval = WXFloatGreaterThan(a, b); + XCTAssertTrue(boolval); +} + +- (void)testWXFloatGreaterThanWithPrecision { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + float a = 0.2; + double b = 0.1; + BOOL boolval = WXFloatGreaterThanWithPrecision(a, b,0.01); + XCTAssertTrue(boolval); +} + +@end http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8178f606/ios/playground/WeexDemoTests/WeexDemoTests.m ---------------------------------------------------------------------- diff --git a/ios/playground/WeexDemoTests/WeexDemoTests.m b/ios/playground/WeexDemoTests/WeexDemoTests.m deleted file mode 100644 index c143038..0000000 --- a/ios/playground/WeexDemoTests/WeexDemoTests.m +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -#import <XCTest/XCTest.h> - -@interface WeexDemoTests : XCTestCase - -@end - -@implementation WeexDemoTests - -- (void)setUp { - [super setUp]; - // Put setup code here. This method is called before the invocation of each test method in the class. -} - -- (void)tearDown { - // Put teardown code here. This method is called after the invocation of each test method in the class. - [super tearDown]; -} - -- (void)testExample { - // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. -} - -- (void)testPerformanceExample { - // This is an example of a performance test case. - [self measureBlock:^{ - // Put the code you want to measure the time of here. - }]; -} - -@end http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8178f606/test/run.sh ---------------------------------------------------------------------- diff --git a/test/run.sh b/test/run.sh index 4fdcbb2..bc343a6 100755 --- a/test/run.sh +++ b/test/run.sh @@ -52,7 +52,7 @@ function buildiOS { function runiOS { echo 'Run in iOS...' echo $1 - # buildiOS $2 + buildiOS $2 echo 'killAll Simulator......' killAll Simulator || echo 'killall failed' # ps -ef