Skip to content

Commit bc20556

Browse files
committed
deploy test cases on iOS device
1 parent 09a5379 commit bc20556

File tree

25 files changed

+1378
-983
lines changed

25 files changed

+1378
-983
lines changed

KakaJSON.xcodeproj/project.pbxproj

Lines changed: 0 additions & 819 deletions
This file was deleted.

KakaJSON.xcodeproj/xcshareddata/xcbaselines/2D92DD212301262500A96858.xcbaseline/9E03EA9C-0B1E-4A12-A908-10E4F2EAC056.plist

Lines changed: 0 additions & 22 deletions
This file was deleted.

KakaJSON.xcodeproj/xcshareddata/xcbaselines/2D92DD212301262500A96858.xcbaseline/Info.plist

Lines changed: 0 additions & 40 deletions
This file was deleted.

KakaJSON/DevGuidline.h

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,7 @@
66
// Copyright © 2019 MJ Lee. All rights reserved.
77
//
88

9-
1. Please make all test cases right in release\debug mode before pushing your code
10-
11-
2. NamingConvention
12-
public extension for system typesmodel types
13-
- obj.kj.memberName
14-
- e.g. "123".kj.numberCount, model.kj.JSON()
15-
16-
internal extension for system typesmodel types
17-
- obj.kj_memberName
18-
- e.g. "123".kj_numberCount, model.kj_JSON()
19-
20-
private\fileprivate
21-
- obj._memberName
22-
- e.g. "123"._numberCount, model._JSON()
23-
24-
Name of method or tpye must be `JSON`
25-
- not `json`, not `Json`
26-
- name of variable can be `json`
27-
28-
/**********************************************************/
29-
30-
1. 提交代码之前请务必先保证通过所有的测试用例Debug+Release模式
9+
1. 提交代码之前请务必先保证在真机模拟器上通过所有的测试用例Debug+Release模式
3110

3211
2. 命名规范
3312
给模型类型系统自带类型扩展public的成员
@@ -45,3 +24,26 @@
4524
类型名方法名必须是大写的`JSON`
4625
- 不要写`json`, 也不要写`Json`
4726
- 如果是变量名常量名参数名可以用小写`json`
27+
28+
/**********************************************************/
29+
30+
1. Please make all test cases right before pushing your code
31+
- include iOS Device\Simulator
32+
- include release\debug mode
33+
34+
2. NamingConvention
35+
public extension for system typesmodel types
36+
- obj.kj.memberName
37+
- e.g. "123".kj.numberCount, model.kj.JSON()
38+
39+
internal extension for system typesmodel types
40+
- obj.kj_memberName
41+
- e.g. "123".kj_numberCount, model.kj_JSON()
42+
43+
private\fileprivate
44+
- obj._memberName
45+
- e.g. "123"._numberCount, model._JSON()
46+
47+
Name of method or tpye must be `JSON`
48+
- not `json`, not `Json`
49+
- name of variable can be `json`

KakaJSON/Extension/Optional+KJ.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,10 @@ private extension Optional {
205205
}
206206

207207
func _JSON(from num: NumberValue) -> Any? {
208-
// stay Bool\Decimal
209-
if num is Bool || num is Decimal { return num }
208+
// stay Bool\IntegerValue
209+
if num is Bool || num is IntegerValue { return num }
210+
// return string for keeping precision
211+
if num is DecimalValue { return "\(num)" }
210212
// return NSDecimalNumber for keeping precision
211213
return NSDecimalNumber(string: "\(num)")
212214
}
@@ -243,8 +245,10 @@ extension String: StringValue {}
243245
extension NSString: StringValue {}
244246

245247
protocol NumberValue {}
248+
protocol DecimalValue {}
246249
extension NSNumber: NumberValue {}
247-
extension Decimal: NumberValue {}
250+
extension Decimal: NumberValue, DecimalValue {}
251+
extension NSDecimalNumber: DecimalValue {}
248252

249253
protocol DigitValue: NumberValue {
250254
init?(truncating: NSNumber)

KakaJSON/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleName</key>
1414
<string>$(PRODUCT_NAME)</string>
1515
<key>CFBundlePackageType</key>
16-
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
16+
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
1818
<string>1.0</string>
1919
<key>CFBundleVersion</key>

KakaJSON/KakaJSON.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
// KakaJSON.h
33
// KakaJSON
44
//
5-
// Created by MJ Lee on 2019/8/12.
5+
// Created by MJ Lee on 2019/8/23.
66
// Copyright © 2019 MJ Lee. All rights reserved.
77
//
88

9-
//#import <Foundation/Foundation.h>
9+
// #import <UIKit/UIKit.h>
1010

1111
//! Project version number for KakaJSON.
12-
//FOUNDATION_EXPORT double KakaJSONVersionNumber;
12+
// FOUNDATION_EXPORT double KakaJSONVersionNumber;
1313

1414
//! Project version string for KakaJSON.
15-
//FOUNDATION_EXPORT const unsigned char KakaJSONVersionString[];
15+
// FOUNDATION_EXPORT const unsigned char KakaJSONVersionString[];
1616

1717
// In this header, you should import all the public headers of your framework using statements like #import <KakaJSON/PublicHeader.h>
1818

KakaJSON/Metadata/Type/ClassType.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
public class ClassType: ModelType, PropertyType, LayoutType {
1010
private(set) var layout: UnsafeMutablePointer<ClassLayout>!
1111
public private(set) var `super`: ClassType?
12-
public private(set) var isPureSwiftClass: Bool = false
12+
// public private(set) var isPureSwiftClass: Bool = false
1313

1414
override func build() {
1515
super.build()
@@ -25,7 +25,7 @@ public class ClassType: ModelType, PropertyType, LayoutType {
2525
}
2626

2727
/// Not sure
28-
isPureSwiftClass = (layout.pointee.rodata ~>> UnsafePointer<UInt8>.self).pointee > 0
28+
// isPureSwiftClass = (layout.pointee.rodata ~>> UnsafePointer<UInt8>.self).pointee > 0
2929
}
3030

3131
override public var description: String {

0 commit comments

Comments
 (0)