Comment out deprecated methods used in perf tests

This commit is contained in:
Davide De Rosa 2019-03-30 22:44:04 +01:00
parent 207a4f063a
commit 7b59276875
2 changed files with 33 additions and 33 deletions

View File

@ -56,10 +56,10 @@ class DataManipulationTests: XCTestCase {
XCTAssertEqual(data.UInt16Value(from: 4), 0x6655) XCTAssertEqual(data.UInt16Value(from: 4), 0x6655)
XCTAssertEqual(data.UInt32Value(from: 0), 0xbbaaff22) XCTAssertEqual(data.UInt32Value(from: 0), 0xbbaaff22)
XCTAssertEqual(data.UInt16Value(from: 3), data.UInt16ValueFromPointers(from: 3)) // XCTAssertEqual(data.UInt16Value(from: 3), data.UInt16ValueFromPointers(from: 3))
XCTAssertEqual(data.UInt32Value(from: 2), data.UInt32ValueFromBuffer(from: 2)) // XCTAssertEqual(data.UInt32Value(from: 2), data.UInt32ValueFromBuffer(from: 2))
XCTAssertEqual(data.UInt16Value(from: 4), data.UInt16ValueFromPointers(from: 4)) // XCTAssertEqual(data.UInt16Value(from: 4), data.UInt16ValueFromPointers(from: 4))
XCTAssertEqual(data.UInt32Value(from: 0), data.UInt32ValueFromBuffer(from: 0)) // XCTAssertEqual(data.UInt32Value(from: 0), data.UInt32ValueFromBuffer(from: 0))
} }
func testZeroingData() { func testZeroingData() {

View File

@ -61,27 +61,27 @@ class RawPerformanceTests: XCTestCase {
} }
} }
// 0.463s // // 0.463s
func testUInt16FromPointers() { // func testUInt16FromPointers() {
let data = Data([0x22, 0xff, 0xaa, 0xbb, 0x55, 0x66]) // let data = Data([0x22, 0xff, 0xaa, 0xbb, 0x55, 0x66])
//
measure { // measure {
for _ in 0..<1000000 { // for _ in 0..<1000000 {
let _ = data.UInt16ValueFromPointers(from: 3) // let _ = data.UInt16ValueFromPointers(from: 3)
} // }
} // }
} // }
//
// 0.863s // // 0.863s
func testUInt32FromBuffer() { // func testUInt32FromBuffer() {
let data = Data([0x22, 0xff, 0xaa, 0xbb, 0x55, 0x66]) // let data = Data([0x22, 0xff, 0xaa, 0xbb, 0x55, 0x66])
//
measure { // measure {
for _ in 0..<1000000 { // for _ in 0..<1000000 {
let _ = data.UInt32ValueFromBuffer(from: 1) // let _ = data.UInt32ValueFromBuffer(from: 1)
} // }
} // }
} // }
// 0.469s // 0.469s
func testUInt32FromPointers() { func testUInt32FromPointers() {
@ -94,14 +94,14 @@ class RawPerformanceTests: XCTestCase {
} }
} }
// 0.071s // // 0.071s
func testRandomUInt32FromBuffer() { // func testRandomUInt32FromBuffer() {
measure { // measure {
for _ in 0..<10000 { // for _ in 0..<10000 {
let _ = try! SecureRandom.uint32FromBuffer() // let _ = try! SecureRandom.uint32FromBuffer()
} // }
} // }
} // }
// 0.063s // 0.063s
func testRandomUInt32FromPointers() { func testRandomUInt32FromPointers() {