if(CPPUNIT_IS_OK)
set(TEST_HEADERS
- test_HYDROData_Document.h
- test_HYDROData_Object.h
- test_HYDROData_Iterator.h
- test_HYDROData_Image.h
- test_HYDROData_Polyline.h
test_HYDROData_Bathymetry.h
- test_HYDROData_Calculation.h
test_HYDROData_BSplineOperation.h
+ test_HYDROData_Calculation.h
+ test_HYDROData_Document.h
+ test_HYDROData_Entity.h
+ test_HYDROData_Image.h
+ test_HYDROData_Iterator.h
test_HYDROData_OperationsFactory.h
+ test_HYDROData_Polyline.h
)
set(TEST_SOURCES
test_HYDROData_Main.cxx
- test_HYDROData_Document.cxx
- test_HYDROData_Object.cxx
- test_HYDROData_Iterator.cxx
- test_HYDROData_Image.cxx
- test_HYDROData_Polyline.cxx
test_HYDROData_Bathymetry.cxx
- test_HYDROData_Calculation.cxx
test_HYDROData_BSplineOperation.cxx
+ test_HYDROData_Calculation.cxx
+ test_HYDROData_Document.cxx
+ test_HYDROData_Entity.cxx
+ test_HYDROData_Image.cxx
+ test_HYDROData_Iterator.cxx
test_HYDROData_OperationsFactory.cxx
+ test_HYDROData_Polyline.cxx
)
set(TEST_EXE test_HYDROData)
--- /dev/null
+#include <test_HYDROData_Entity.h>
+
+#include <HYDROData_Document.h>
+#include <HYDROData_Entity.h>
+
+#include <QString>
+
+void test_HYDROData_Entity::testName()
+{
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
+ static const QString aName("test_name");
+ anObj->SetName(aName);
+ CPPUNIT_ASSERT_EQUAL(aName.toStdString(), anObj->GetName().toStdString());
+
+ aDoc->Close();
+}
+
+void test_HYDROData_Entity::testRemove()
+{
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
+ CPPUNIT_ASSERT(!anObj->IsRemoved());
+ anObj->Remove();
+ CPPUNIT_ASSERT(anObj->IsRemoved());
+
+ aDoc->Close();
+}
+
+void test_HYDROData_Entity::testCopy()
+{
+ Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
+
+ Handle(HYDROData_Entity) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
+ static const QString aName("test_name");
+ anObj->SetName(aName);
+
+ Handle(HYDROData_Entity) aCopy = aDoc->CreateObject(KIND_IMAGE); // object for copy
+ CPPUNIT_ASSERT(aCopy->GetName().isEmpty());
+ anObj->CopyTo(aCopy);
+
+ // check the copied object has same name as original
+ CPPUNIT_ASSERT_EQUAL(aName.toStdString(), aCopy->GetName().toStdString());
+
+ aDoc->Close();
+}
--- /dev/null
+#include <cppunit/extensions/HelperMacros.h>
+
+class test_HYDROData_Entity : public CppUnit::TestFixture {
+ CPPUNIT_TEST_SUITE(test_HYDROData_Entity);
+ CPPUNIT_TEST(testName);
+ CPPUNIT_TEST(testRemove);
+ CPPUNIT_TEST(testCopy);
+ CPPUNIT_TEST_SUITE_END();
+
+private:
+
+public:
+
+ void setUp() {}
+
+ void tearDown() {}
+
+ // checks the "name" methods
+ void testName();
+
+ // checks the remove of object
+ void testRemove();
+
+ // checks the copying of object
+ void testCopy();
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(test_HYDROData_Entity);
+CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(test_HYDROData_Entity, "HYDROData_Entity");
+++ /dev/null
-#include<test_HYDROData_Object.h>
-
-#include <HYDROData_Document.h>
-#include <HYDROData_Object.h>
-
-#include <QString>
-
-void test_HYDROData_Object::testName()
-{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
-
- Handle(HYDROData_Object) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
- static const QString aName("test_name");
- anObj->SetName(aName);
- CPPUNIT_ASSERT_EQUAL(aName.toStdString(), anObj->GetName().toStdString());
-
- aDoc->Close();
-}
-
-void test_HYDROData_Object::testRemove()
-{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
-
- Handle(HYDROData_Object) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
- CPPUNIT_ASSERT(!anObj->IsRemoved());
- anObj->Remove();
- CPPUNIT_ASSERT(anObj->IsRemoved());
-
- aDoc->Close();
-}
-
-void test_HYDROData_Object::testCopy()
-{
- Handle(HYDROData_Document) aDoc = HYDROData_Document::Document(1);
-
- Handle(HYDROData_Object) anObj = aDoc->CreateObject(KIND_IMAGE); // any object
- static const QString aName("test_name");
- anObj->SetName(aName);
-
- Handle(HYDROData_Object) aCopy = aDoc->CreateObject(KIND_IMAGE); // object for copy
- CPPUNIT_ASSERT(aCopy->GetName().isEmpty());
- anObj->CopyTo(aCopy);
-
- // check the copied object has same name as original
- CPPUNIT_ASSERT_EQUAL(aName.toStdString(), aCopy->GetName().toStdString());
-
- aDoc->Close();
-}
+++ /dev/null
-#include <cppunit/extensions/HelperMacros.h>
-
-class test_HYDROData_Object : public CppUnit::TestFixture {
- CPPUNIT_TEST_SUITE(test_HYDROData_Object);
- CPPUNIT_TEST(testName);
- CPPUNIT_TEST(testRemove);
- CPPUNIT_TEST(testCopy);
- CPPUNIT_TEST_SUITE_END();
-
-private:
-
-public:
-
- void setUp() {}
-
- void tearDown() {}
-
- // checks the "name" methods
- void testName();
-
- // checks the remove of object
- void testRemove();
-
- // checks the copying of object
- void testCopy();
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(test_HYDROData_Object);
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(test_HYDROData_Object, "HYDROData_Object");
aPolylineData << aPolylineSect;
- aCropPolyline->setPolylineData( aPolylineData );
+ aCropPolyline->SetPolylineData( aPolylineData );
// prepare Composer Operation
ImageComposer_Operator* aCropOp =
Handle(HYDROData_Polyline)::DownCast(aDoc->CreateObject(KIND_POLYLINE));
// empty image
- int aDim = aPolyline->getDimension();
+ int aDim = aPolyline->GetDimension();
CPPUNIT_ASSERT(aDim == 0 );
- aPolyline->setDimension(2);
- aDim = aPolyline->getDimension();
+ aPolyline->SetDimension(2);
+ aDim = aPolyline->GetDimension();
CPPUNIT_ASSERT( aDim == 2 );
- aPolyline->setDimension(3);
- aDim = aPolyline->getDimension();
+ aPolyline->SetDimension(3);
+ aDim = aPolyline->GetDimension();
CPPUNIT_ASSERT( aDim == 3 );
PolylineSection aSect1;
aSect1.myIsClosed = true;
aSections << aSect2;
- aPolyline->setPolylineData( aSections );
- QList<PolylineSection> aRestoredSect = aPolyline->getPolylineData();
+ aPolyline->SetPolylineData( aSections );
+ QList<PolylineSection> aRestoredSect = aPolyline->GetPolylineData();
int aRestSize = aRestoredSect.size();
CPPUNIT_ASSERT( aRestSize == 2 );
HYDROGUI_PrsZoneDriver.h
HYDROGUI_Shape.h
HYDROGUI_ShowHideOp.h
- HYDROGUI_SplitZonesTool.h
HYDROGUI_Tool.h
HYDROGUI_TwoImagesDlg.h
HYDROGUI_TwoImagesOp.h
HYDROGUI_PrsZoneDriver.cxx
HYDROGUI_Shape.cxx
HYDROGUI_ShowHideOp.cxx
- HYDROGUI_SplitZonesTool.cxx
HYDROGUI_Tool.cxx
HYDROGUI_TwoImagesDlg.cxx
HYDROGUI_TwoImagesOp.cxx