Ajout de l'ensemble du workspace.
[GPU.git] / WCudaMSE / Student_Cuda / src / cpp / test / junit / 01_Test_Hello / TestHello.cpp
diff --git a/WCudaMSE/Student_Cuda/src/cpp/test/junit/01_Test_Hello/TestHello.cpp b/WCudaMSE/Student_Cuda/src/cpp/test/junit/01_Test_Hello/TestHello.cpp
new file mode 100755 (executable)
index 0000000..acdf9d8
--- /dev/null
@@ -0,0 +1,48 @@
+#include "TestHello.h"
+#include "Device.h"
+
+/*----------------------------------------------------------------------*\
+ |*                    Declaration                                     *|
+ \*---------------------------------------------------------------------*/
+
+/*--------------------------------------*\
+ |*            Imported                *|
+ \*-------------------------------------*/
+
+extern bool helloCuda(void);
+extern bool isAddScalarGPU_Ok(void);
+
+/*----------------------------------------------------------------------*\
+ |*                    Implementation                                  *|
+ \*---------------------------------------------------------------------*/
+
+/*--------------------------------------*\
+ |*            Constructor             *|
+ \*-------------------------------------*/
+
+TestHello::TestHello(int deviceId)
+    {
+    this->deviceId=deviceId;
+
+    TEST_ADD(TestHello::testHelloCuda);
+    TEST_ADD(TestHello::testAdd);
+    }
+
+/*--------------------------------------*\
+ |*            Methodes                *|
+ \*-------------------------------------*/
+
+void TestHello::testHelloCuda(void)
+    {
+    TEST_ASSERT(helloCuda() == true);
+    }
+
+void TestHello::testAdd(void)
+    {
+    TEST_ASSERT(isAddScalarGPU_Ok() == true);
+    }
+
+/*----------------------------------------------------------------------*\
+ |*                    End                                             *|
+ \*---------------------------------------------------------------------*/
+