]> SALOME platform Git repositories - modules/kernel.git/blobdiff - src/SALOMEDS/Test/SALOMEDSTest_AttributeStudyProperties.cxx
Salome HOME
updated copyright message
[modules/kernel.git] / src / SALOMEDS / Test / SALOMEDSTest_AttributeStudyProperties.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 965773d..3816c9c
@@ -1,18 +1,20 @@
-// Copyright (C) 2006  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-// 
+//
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either 
-// version 2.1 of the License.
-// 
-// This library is distributed in the hope that it will be useful 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 // Lesser General Public License for more details.
 //
-// You should have received a copy of the GNU Lesser General Public  
-// License along with this library; if not, write to the Free Software 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
  */
 void SALOMEDSTest::testAttributeStudyProperties()
 {
-  //Create or find the Study manager
-  _PTR(StudyManager) sm ( new SALOMEDS_StudyManager(_sm) );
-
-  CPPUNIT_ASSERT(sm);
-
-  //Create a new study
-  _PTR(Study) study = sm->NewStudy("Test");
+  //Create Study
+  _PTR(Study) study(new SALOMEDS_Study(_study));
 
   CPPUNIT_ASSERT(study);
 
@@ -66,7 +63,7 @@ void SALOMEDSTest::testAttributeStudyProperties()
   CPPUNIT_ASSERT(_attr->GetUserName() == "srn");
 
   //Check method SetCreationMode
-  string value = "from scratch";
+  std::string value = "from scratch";
   _attr->SetCreationMode(value);
 
   //Check method GetCreationMode
@@ -95,8 +92,8 @@ void SALOMEDSTest::testAttributeStudyProperties()
   _attr->SetModification("srn2", 6, 7, 8, 9, 10);
 
   //Check method GetModificationsList
-  vector<string> vs;
-  vector<int> vi[5];
+  std::vector<std::string> vs;
+  std::vector<int> vi[5];
   _attr->GetModificationsList(vs, vi[0], vi[1], vi[2], vi[3], vi[4], false);
   CPPUNIT_ASSERT(vs[0] == "srn2" && vi[0][0] == 6 && vi[1][0] == 7 && vi[2][0] == 8 && vi[3][0] == 9 && vi[4][0] == 10);
 
@@ -106,7 +103,7 @@ void SALOMEDSTest::testAttributeStudyProperties()
   _attr->GetModificationsList(vs, vi[0], vi[1], vi[2], vi[3], vi[4], true);
   CPPUNIT_ASSERT(vs[0] == "srn" && vi[0][0] == 1 && vi[1][0] == 2 && vi[2][0] == 3 && vi[3][0] == 4 && vi[4][0] == 5);
 
-  sm->Close(study);
+  study->Clear();
 }