Skip to content

Commit 586531c

Browse files
committed
Make test macOS-only, Fix code style
1 parent 7863d90 commit 586531c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Tests/SwiftTermTests/SelectionTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ final class SelectionTests: XCTestCase, TerminalDelegate {
3939

4040
}
4141

42-
func testMouseHitCorrectWhenScrolled() {
42+
#if os(macOS)
43+
// Test only on macOS due to differences in how frames are handled on mac and iOS
44+
func testMouseHitCorrectWhenScrolled()
45+
{
4346
let view = TerminalView(frame: CGRect(origin: .zero, size: .init(width: 10, height: 10)))
4447

4548
for _ in 0..<100 {
@@ -54,4 +57,5 @@ final class SelectionTests: XCTestCase, TerminalDelegate {
5457
view.scrollTo(row: 1)
5558
XCTAssertEqual(view.calculateMouseHit(at: CGPoint(x: 0, y: 10)).grid.row, 1)
5659
}
60+
#endif
5761
}

0 commit comments

Comments
 (0)