Skip to content


Browse files Browse the repository at this point in the history
Add unit test for QgsDataDefined copy
  • Loading branch information
vmora authored and nyalldawson committed Apr 21, 2015
1 parent 2fddcaf commit 8cb8755
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/src/core/testqgsdatadefined.cpp
Expand Up @@ -34,6 +34,7 @@ class TestQgsDataDefined: public QObject
void init();// will be called before each testfunction is executed.
void cleanup();// will be called after every testfunction.
void create();//test creating a data defined container
void copy();// test cpy destruction (double delete)
void gettersSetters(); //test getters and setters
void defaultValues(); //test hasDefaultValues method
void equality(); //test equality operators
Expand Down Expand Up @@ -71,6 +72,15 @@ void TestQgsDataDefined::create()
QCOMPARE( dd->field(), QString( "field" ) );

void TestQgsDataDefined::copy()
QgsDataDefined dd( true, true, QString( "sqrt(2)" ), QString( "field" ) );
QgsDataDefined cpy( dd );
QgsDataDefined assigned;
assigned = cpy;

void TestQgsDataDefined::gettersSetters()
QgsDataDefined dd;
Expand Down

0 comments on commit 8cb8755

Please sign in to comment.