#include <gp_Pnt.hxx>
+#include <NCollection_Vector.hxx>
+
#define ItemType gp_Pnt
#define Key1Type Standard_Real
#define Key2Type Standard_Integer
return 0;
}
+//=======================================================================
+//function : QANColTestVector
+//purpose :
+//=======================================================================
+static Standard_Integer QANColTestVector (Draw_Interpretor&, Standard_Integer, const char**)
+{
+ // test method Append and copying of empty vector
+ NCollection_Vector<int> aVec;
+ NCollection_Vector<int> aVec2 (aVec);
+ NCollection_Vector<int> aVec3;
+ aVec3 = aVec;
+
+ aVec.Append(5);
+ if (aVec(0) != 5)
+ std::cout << "Error: wrong value in original vector!" << endl;
+ aVec2.Append(5);
+ if (aVec2(0) != 5)
+ std::cout << "Error: wrong value in copy-constructed vector!" << endl;
+ aVec3.Append(5);
+ if (aVec3(0) != 5)
+ std::cout << "Error: wrong value in copied vector!" << endl;
+ std::cout << "Test OK" << endl;
+
+ return 0;
+}
+
//=======================================================================
//function : QANColTestSequence
//purpose :
theCommands.Add("QANColTestIndexedDataMap", "QANColTestIndexedDataMap", __FILE__, QANColTestIndexedDataMap, group);
theCommands.Add("QANColTestList", "QANColTestList", __FILE__, QANColTestList, group);
theCommands.Add("QANColTestSequence", "QANColTestSequence", __FILE__, QANColTestSequence, group);
-
- return;
+ theCommands.Add("QANColTestVector", "QANColTestVector", __FILE__, QANColTestVector, group);
}