You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func testInfiniteDouble()throws{letdict:[String:Any]=["nick_name":"旺财","sale_price":"\(Double.greatestFiniteMagnitude)","run_speed":"\(Float.greatestFiniteMagnitude)",]
guard let dog =MJDog.mj_object(withKeyValues: dict)else{fatalError("dog conversion failed")}XCTAssertEqual(dog.nickName,(dict["nick_name"]as!String))// 这个会通不过XCTAssertEqual(dog.salePrice,Double(dict["sale_price"]as!String))XCTAssertEqual(dog.runSpeed,Float(dict["run_speed"]as!String))}
The text was updated successfully, but these errors were encountered:
描述bug
double 类型字符串转 Double 会造成溢出
怎么样重现这个bug
Model
Test case:
The text was updated successfully, but these errors were encountered: