Skip to content

Commit

Permalink
Adding tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koefferlein committed Oct 19, 2024
1 parent 0328c7e commit 14fa7a3
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions testdata/ruby/qtbinding.rb
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,39 @@ def test_60

end

# issue-1899
def test_61

p1 = RBA::QPoint::new(1, 2)
p2 = RBA::QPoint::new(1, 2)
p3 = RBA::QPoint::new(2, 3)
assert_equal((p1 * 5).x, 5)
assert_equal((p1 * 5).y, 10)
assert_equal(p1 == p2, true)
assert_equal(p1 == p3, false)
assert_equal(p1 != p2, false)
assert_equal(p1 != p3, true)
assert_equal((p1 + p3).x, 3)
assert_equal((p1 + p3).y, 5)
assert_equal((p1 - p3).x, -1)
assert_equal((p1 - p3).y, -1)

p1 = RBA::QPointF::new(1, 2)
p2 = RBA::QPointF::new(1, 2)
p3 = RBA::QPointF::new(2, 3)
assert_equal((p1 * 5).x, 5)
assert_equal((p1 * 5).y, 10)
assert_equal(p1 == p2, true)
assert_equal(p1 == p3, false)
assert_equal(p1 != p2, false)
assert_equal(p1 != p3, true)
assert_equal((p1 + p3).x, 3)
assert_equal((p1 + p3).y, 5)
assert_equal((p1 - p3).x, -1)
assert_equal((p1 - p3).y, -1)

end

end

load("test_epilogue.rb")

0 comments on commit 14fa7a3

Please sign in to comment.