Unit Test Function 'XCTAssertEqualWithAccuracy' is Deprecated in Xcode Beta 5 / Swift 4.0 -


the unit test function 'xctassertequalwithaccuracy' deprecated in xcode beta 5 / swift 4.0, , i'm wondering how use new equivalent?

here's code:

xctassertequalwithaccuracy(try features.sumvalues(x: zearthabnormal), 54.800583, accuracy: 0.0001) 

and warning says:

'xctassertequalwithaccuracy(::accuracy::file:line:)' deprecated: renamed 'xctassertequal(::accuracy::file:line:)'

it turns out, answer quite simple. delete 'withaccuracy' , function works same.

xctassertequal(try features.sumvalues(x: zearthabnormal), 54.800583, accuracy: 0.0001) 

Comments

Popular posts from this blog

angular - DownloadURL return null in below code -

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -