Commit 1036bcc6 by Sarkizz

添加单元测试

parent dc7ad5d5
...@@ -26,4 +26,25 @@ extension DeviceInfoTest { ...@@ -26,4 +26,25 @@ extension DeviceInfoTest {
let model = MRDevice.modelVersion let model = MRDevice.modelVersion
XCTAssert(model == "x86_64", "这都能为空?") XCTAssert(model == "x86_64", "这都能为空?")
} }
func testSystemVersion() {
let version = MRDevice.systemVersion
XCTAssert(version == "13.1")
XCTAssert(version > "13.0.1")
XCTAssert(version >= "13.0.2")
XCTAssert(version >= "13.1")
XCTAssert(version < "13.1.1")
XCTAssert(version < "14.1.1")
XCTAssert(version <= "14.0.1")
XCTAssert(version <= "13.1")
XCTAssert("13.1" == version)
XCTAssert("13.0.1" < version)
XCTAssert("13.0.2" <= version)
XCTAssert("13.1" <= version)
XCTAssert("13.1.1" > version)
XCTAssert("14.1.1" > version)
XCTAssert("14.0.1" >= version)
XCTAssert("13.1" >= version)
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment