]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Linux compilation.
authoradv <adv@opencascade.com>
Thu, 24 Oct 2013 12:06:07 +0000 (12:06 +0000)
committeradv <adv@opencascade.com>
Thu, 24 Oct 2013 12:06:07 +0000 (12:06 +0000)
src/HYDROData/CMakeLists.txt
src/HYDROData/test_HYDROData_Entity.cxx [new file with mode: 0644]
src/HYDROData/test_HYDROData_Entity.h [new file with mode: 0644]
src/HYDROData/test_HYDROData_Object.cxx [deleted file]
src/HYDROData/test_HYDROData_Object.h [deleted file]
src/HYDROData/test_HYDROData_OperationsFactory.cxx
src/HYDROData/test_HYDROData_Polyline.cxx
src/HYDROGUI/CMakeLists.txt

index 5e96806857217798c6a03ac9c85e947800d1a181..71fc6191f63dfbafecab902c9311926f9eae274e 100644 (file)
@@ -70,28 +70,28 @@ set(PROJECT_LIBRARIES HYDROData)
 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)
diff --git a/src/HYDROData/test_HYDROData_Entity.cxx b/src/HYDROData/test_HYDROData_Entity.cxx
new file mode 100644 (file)
index 0000000..0700716
--- /dev/null
@@ -0,0 +1,48 @@
+#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();
+}
diff --git a/src/HYDROData/test_HYDROData_Entity.h b/src/HYDROData/test_HYDROData_Entity.h
new file mode 100644 (file)
index 0000000..d313802
--- /dev/null
@@ -0,0 +1,29 @@
+#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");
diff --git a/src/HYDROData/test_HYDROData_Object.cxx b/src/HYDROData/test_HYDROData_Object.cxx
deleted file mode 100644 (file)
index 7e96fda..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#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();
-}
diff --git a/src/HYDROData/test_HYDROData_Object.h b/src/HYDROData/test_HYDROData_Object.h
deleted file mode 100644 (file)
index 12284fa..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#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");
index bea1c987d75fd8b22dbc65085ed87a43813cbf0b..b5d068fe53273fdbe88a52ae17cd8cf4c53f34db 100644 (file)
@@ -60,7 +60,7 @@ void test_HYDROData_OperationsFactory::testCrop()
 
   aPolylineData << aPolylineSect;
 
-  aCropPolyline->setPolylineData( aPolylineData );
+  aCropPolyline->SetPolylineData( aPolylineData );
 
   // prepare Composer Operation
   ImageComposer_Operator* aCropOp = 
index 290fffad30f70bbdabe5afb1bdf4d412d6d20b0a..8899ee2929170663f86691491ecd8e78b0e99d85 100755 (executable)
@@ -14,15 +14,15 @@ void test_HYDROData_Polyline::testPolyline()
     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;
@@ -39,8 +39,8 @@ void test_HYDROData_Polyline::testPolyline()
   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 );
   
index 7db85c3707e928c96bfe6b4680d90246b80231db..d121c61b1ed8b3a6e245e95e44f27db2aa487ff5 100644 (file)
@@ -41,7 +41,6 @@ set(PROJECT_HEADERS
     HYDROGUI_PrsZoneDriver.h
     HYDROGUI_Shape.h
     HYDROGUI_ShowHideOp.h
-    HYDROGUI_SplitZonesTool.h
     HYDROGUI_Tool.h
     HYDROGUI_TwoImagesDlg.h
     HYDROGUI_TwoImagesOp.h
@@ -91,7 +90,6 @@ set(PROJECT_SOURCES
     HYDROGUI_PrsZoneDriver.cxx
     HYDROGUI_Shape.cxx
     HYDROGUI_ShowHideOp.cxx
-    HYDROGUI_SplitZonesTool.cxx
     HYDROGUI_Tool.cxx
     HYDROGUI_TwoImagesDlg.cxx
     HYDROGUI_TwoImagesOp.cxx