iOS???????
????????????? ???????[ 2017/7/12 11:06:29 ] ??????????????? ???????
???????????
//???????????? ????????????????????????
func testAdd(){
???? let expectValue = 20
???? let actualValue = 30
???? XCTAssertEqual(expectValue?? actualValue)
???? }
???????????
??//??????????????????????????
???? func testLogin() {
???? let expectOption = expectation(description: "???????")
???? let param = LoginRequestModel()
???? param.phone = "18657195470"
???? param.pwd = "123456".md5()
???? AppAPIHelper.commen().login(model: param?? complete: { (result) -> ()? in
???? if let object = result as? StarUserModel{
???? if let uid = object.userinfo?.id{
???? ShareModelHelper.instance().uid = Int(uid)
???? UserDefaults.standard.set(uid?? forKey: AppConst.UserDefaultKey.uid.rawValue)
???? }
???? if let phone = object.userinfo?.phone{
???? ShareModelHelper.instance().phone = phone
???? UserDefaults.standard.set(phone?? forKey: AppConst.UserDefaultKey.phone.rawValue)
???? }
???? ShareModelHelper.instance().token = object.token
???? UserDefaults.standard.set(object.token?? forKey: AppConst.UserDefaultKey.token.rawValue)
???? expectOption.fulfill()
???? }
???? return nil
???? }?? error: nil)
???? waitForExpectations(timeout: 15?? handler: nil)
???? }
???????????
??//???????????????????Add???????????
???? func testPerformanceExample() {
???? // This is an example of a performance test case.
???? self.measure {
???? // Put the code you want to measure the time of here.
???? self.testLogin()
???? self.testAdd()
???? }
???? }
????6.??е??????
?????????????
?????????????
?????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11