Skip to content

Commit

Permalink
Add test for equality operator of null and empty rectangles
Browse files Browse the repository at this point in the history
  • Loading branch information
strk committed Oct 8, 2023
1 parent 8f71633 commit 662544c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/src/core/geometry/testqgsrectangle.cpp
Expand Up @@ -311,6 +311,15 @@ void TestQgsRectangle::operators()
QCOMPARE( rect2.yMinimum(), 18.0 );
QCOMPARE( rect2.height(), rect1.height() );
QCOMPARE( rect2.width(), rect1.width() );

// Null == Null
QVERIFY( QgsRectangle() == QgsRectangle() );

// Different kind of empties
QVERIFY( QgsRectangle( 1, 1, 1, 1 ) != QgsRectangle( 2, 2, 2, 2 ) );

// Same kind of empty
QVERIFY( QgsRectangle( 1, 1, 1, 1 ) == QgsRectangle( 1, 1, 1, 1 ) );
}

void TestQgsRectangle::asVariant()
Expand Down

0 comments on commit 662544c

Please sign in to comment.