diff --git a/Sources/SwiftMath/MathRender/MTMathAtomFactory.swift b/Sources/SwiftMath/MathRender/MTMathAtomFactory.swift index 2062c98..6588b08 100644 --- a/Sources/SwiftMath/MathRender/MTMathAtomFactory.swift +++ b/Sources/SwiftMath/MathRender/MTMathAtomFactory.swift @@ -528,11 +528,11 @@ public class MTMathAtomFactory { case "\u{0410}"..."\u{044F}": return MTMathAtom(type: .ordinary, value: chStr) case _ where ch.utf32Char < 0x0021 || ch.utf32Char > 0x007E: - // allow Chinese characters for testing - if ((ch.utf32Char >= 0x4E00) && (ch.utf32Char <= 0x9FFF)) { - // CJK support. But xits-math-cn font only has Chinese characters support. - return MTMathAtom(type:.ordinary, value:chStr) - } +// // allow Chinese characters for testing +// if ((ch.utf32Char >= 0x4E00) && (ch.utf32Char <= 0x9FFF)) { +// // CJK support. But xits-math-cn font only has Chinese characters support. +// return MTMathAtom(type:.ordinary, value:chStr) +// } return nil case "$", "%", "#", "&", "~", "\'", "^", "_", "{", "}", "\\": return nil diff --git a/Tests/SwiftMathTests/ConcurrencyThreadsafeTests.swift b/Tests/SwiftMathTests/ConcurrencyThreadsafeTests.swift index e79f7c5..220c19e 100644 --- a/Tests/SwiftMathTests/ConcurrencyThreadsafeTests.swift +++ b/Tests/SwiftMathTests/ConcurrencyThreadsafeTests.swift @@ -29,9 +29,9 @@ final class ConcurrencyThreadsafeTests: XCTestCase { XCTAssertNotNil(result4) } } - executionGroup.notify(queue: .main) { [weak self] in - // print("All test cases completed: \(self?.testCount ?? 0)") - } +// executionGroup.notify(queue: .main) { [weak self] in +// // print("All test cases completed: \(self?.testCount ?? 0)") +// } executionGroup.wait() } func helperConcurrency(_ count: Int, in group: DispatchGroup, on queue: DispatchQueue, _ testClosure: @escaping () -> (Void)) { diff --git a/Tests/SwiftMathTests/MTFontMathTableV2Tests.swift b/Tests/SwiftMathTests/MTFontMathTableV2Tests.swift index a6dcbf4..512af91 100644 --- a/Tests/SwiftMathTests/MTFontMathTableV2Tests.swift +++ b/Tests/SwiftMathTests/MTFontMathTableV2Tests.swift @@ -47,14 +47,14 @@ final class MTFontMathTableV2Tests: XCTestCase { func helperConcurrentMTFontMathTableV2(_ count: Int, mtfont: MTFontV2, in group: DispatchGroup, on queue: DispatchQueue) { let workitem = DispatchWorkItem { let mTable = mtfont.mathTable - let values = [ - mTable?.fractionNumeratorDisplayStyleShiftUp, - mTable?.fractionNumeratorShiftUp, - mTable?.fractionDenominatorDisplayStyleShiftDown, - mTable?.fractionDenominatorShiftDown, - mTable?.fractionNumeratorDisplayStyleGapMin, - mTable?.fractionNumeratorGapMin, - ].compactMap{$0} +// let values = [ +// mTable?.fractionNumeratorDisplayStyleShiftUp, +// mTable?.fractionNumeratorShiftUp, +// mTable?.fractionDenominatorDisplayStyleShiftDown, +// mTable?.fractionDenominatorShiftDown, +// mTable?.fractionNumeratorDisplayStyleGapMin, +// mTable?.fractionNumeratorGapMin, +// ].compactMap{$0} // if count % 50 == 0 { // print(values) // accessed these values on global thread. // } @@ -64,14 +64,14 @@ final class MTFontMathTableV2Tests: XCTestCase { // print("\(Thread.isMainThread ? "main" : "global") completed .....") let mTable = mtfont.mathTable if count % 70 == 0 { - let values = [ - mTable?.fractionNumeratorDisplayStyleShiftUp, - mTable?.fractionNumeratorShiftUp, - mTable?.fractionDenominatorDisplayStyleShiftDown, - mTable?.fractionDenominatorShiftDown, - mTable?.fractionNumeratorDisplayStyleGapMin, - mTable?.fractionNumeratorGapMin, - ].compactMap{$0} +// let values = [ +// mTable?.fractionNumeratorDisplayStyleShiftUp, +// mTable?.fractionNumeratorShiftUp, +// mTable?.fractionDenominatorDisplayStyleShiftDown, +// mTable?.fractionDenominatorShiftDown, +// mTable?.fractionNumeratorDisplayStyleGapMin, +// mTable?.fractionNumeratorGapMin, +// ].compactMap{$0} // if count % 50 == 0 { // print(values) // } diff --git a/Tests/SwiftMathTests/MathImageTests.swift b/Tests/SwiftMathTests/MathImageTests.swift index d858923..7c081c6 100644 --- a/Tests/SwiftMathTests/MathImageTests.swift +++ b/Tests/SwiftMathTests/MathImageTests.swift @@ -40,7 +40,7 @@ final class MathImageTests: XCTestCase { XCTAssertNotNil(result.image) if result.error == nil, let image = result.image, let imageData = image.pngData() { safeImage(fileName: "\(caseNumber)", pngData: imageData) - let fileUrl = URL(fileURLWithPath: NSTemporaryDirectory()) + //let fileUrl = URL(fileURLWithPath: NSTemporaryDirectory()) print("completed image-\(caseNumber).png") } default: @@ -49,7 +49,7 @@ final class MathImageTests: XCTestCase { XCTAssertNotNil(result.image) if result.error == nil, let image = result.image, let imageData = image.pngData() { safeImage(fileName: "\(caseNumber)", pngData: imageData) - let fileUrl = URL(fileURLWithPath: NSTemporaryDirectory()) + //let fileUrl = URL(fileURLWithPath: NSTemporaryDirectory()) print("completed image-\(caseNumber).png") } } @@ -77,7 +77,7 @@ final class MathImageTests: XCTestCase { } executionGroup.notify(queue: .main) { [weak self] in let fileUrl = URL(fileURLWithPath: NSTemporaryDirectory()) - print("\(self?.testCount)/\(self?.totalCases) completed, check \(fileUrl.path) ===") + print("\(self!.testCount)/\(self!.totalCases) completed, check \(fileUrl.path) ===") XCTAssertEqual(self?.testCount,self?.totalCases) } executionGroup.wait()