Files
swiftrplidar/Tests/SwiftRPLidarTests/SwiftRPLidarTests.swift

41 lines
806 B
Swift

import XCTest
@testable import SwiftRPLidar
final class SwiftRPLidarTests: XCTestCase {
func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct
// results.
// XCTAssertEqual(SwiftRPLidar().text, "Hello, World!")
}
static var allTests = [
("testExample", testExample),
]
}
struct MockSerialPort: LidarSerial {
var dtr: Bool
var inWaiting: Int
func closePort() {
}
func openPort() throws {
}
func readData(ofLength: Int) throws -> Data {
return Data()
}
func writeData(_ data: Data) throws -> Int {
return 0
}
func setBaudrate(baudrate: Int) {
}
}