Files
ichmagmaus111andClaude Opus 5.5 0622057a4f Ghostgram: open-source release
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:57:09 +01:00

35 lines
1.1 KiB
Swift

#if canImport(UIKit)
import XCTest
import UIKit
@testable import RichTextEditorUIKit
import RichTextEditorCore
final class FacadeWritingDirectionTests: XCTestCase {
private func view() -> RichTextEditorView {
let v = RichTextEditorView(frame: CGRect(x: 0, y: 0, width: 320, height: 200))
v.document = Document(blocks: [.paragraph(ParagraphBlock(id: BlockID("a"),
runs: [TextRun(text: "Hi")]))])
return v
}
func test_overrideProperty_isReflectedInDocument() {
let v = view()
v.layoutDirectionOverride = .rightToLeft
XCTAssertEqual(v.layoutDirectionOverride, .rightToLeft)
XCTAssertEqual(v.document.layoutDirection, .rightToLeft)
}
func test_settingDocument_appliesItsLayoutDirection() {
let v = view()
var doc = v.document
doc.layoutDirection = .leftToRight
v.document = doc
XCTAssertEqual(v.layoutDirectionOverride, .leftToRight)
}
func test_default_isAuto() {
XCTAssertEqual(view().layoutDirectionOverride, .auto)
}
}
#endif