ChineseStringAutoTest.swift 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // ChineseStringAutoTest.swift
  3. // KdanAuto
  4. //
  5. // Created by 朱东勇 on 2022/11/22.
  6. //
  7. import Foundation
  8. import Cocoa
  9. class ChineseStringAutoTest : AutoTest {
  10. override func type() -> String {
  11. return "PDFConvert_China_Auto_Test"
  12. }
  13. override func name() -> String {
  14. return "中文字符转换准确率测试"
  15. }
  16. override func keys() -> NSArray {
  17. return ["字符对比", "前一版对比"]
  18. }
  19. static var cSharedInstance = ChineseStringAutoTest()
  20. override class func shared() -> AutoTest? {
  21. return cSharedInstance
  22. }
  23. // Auto Test refrence Check File
  24. override func autoTest() {
  25. // 暂时先用转RTF做为范例
  26. let checkPath = self.checkFilePath()
  27. let originPath = self.originFilePath()
  28. let checkData = NSData.init(contentsOfFile: checkPath) as! Data
  29. var documentAttributes:NSDictionary!
  30. let checkAttString = NSAttributedString.init(rtf: checkData, documentAttributes: &documentAttributes)
  31. NSLog("\(checkAttString)")
  32. }
  33. // Auto Test refrence Latest Status
  34. override func autoCheck() {
  35. }
  36. }