[SCM] OCE packaging branch, debian, updated. debian/0.11-1

tpaviot tpaviot at gmail.com
Thu Dec 13 19:16:48 UTC 2012


The following commit has been merged in the debian branch:
commit 64330e595a54d166bc9d7a75d58180794572d684
Author: tpaviot <tpaviot at gmail.com>
Date:   Sat Dec 1 13:35:58 2012 +0100

    Added SortTools_test (see Issue #322)

diff --git a/test/SortTools_test/CMakeLists.txt b/test/SortTools_test/CMakeLists.txt
new file mode 100644
index 0000000..16b5046
--- /dev/null
+++ b/test/SortTools_test/CMakeLists.txt
@@ -0,0 +1,3 @@
+IF (${PROJECT_NAME}_MODEL)
+    ADD_OCE_TEST(sorttools_test "TKernel")
+ENDIF (${PROJECT_NAME}_MODEL)
diff --git a/test/SortTools_test/sorttools_test.cpp b/test/SortTools_test/sorttools_test.cpp
new file mode 100644
index 0000000..c02b0c1
--- /dev/null
+++ b/test/SortTools_test/sorttools_test.cpp
@@ -0,0 +1,32 @@
+#include <TCollection_CompareOfInteger.hxx>
+#include <TColStd_Array1OfInteger.hxx>
+#include <SortTools_QuickSortOfInteger.hxx>
+
+#include <gtest/gtest.h>
+
+
+class MyCompare : public TCollection_CompareOfInteger
+{
+
+    public:
+        Standard_Boolean IsLower(
+            const Standard_Integer &Left, const Standard_Integer &Right) const
+        {
+            return Left <= Right;
+        }
+};
+
+TEST(SortToolsTestSuite, testQuickSortOfInteger)
+{
+    MyCompare comp;
+    TColStd_Array1OfInteger arr(1, 3);
+    arr.SetValue(1, 0);
+    arr.SetValue(2, 0);
+    arr.SetValue(3, 0);
+    SortTools_QuickSortOfInteger::Sort(arr, comp);
+}
+
+int main(int argc, char **argv){
+  testing::InitGoogleTest(&argc, argv);
+  return RUN_ALL_TESTS();
+}

-- 
OCE packaging



More information about the debian-science-commits mailing list