BackendModule/FrontendModule classes tests (#349)
authorIvan Vagin/AI Tools Lab /SRR/Engineer/삼성전자 <ivan.vagin@samsung.com>
Fri, 22 Jun 2018 13:55:55 +0000 (16:55 +0300)
committerSergey Vostokov/AI Tools Lab /SRR/Staff Engineer/삼성전자 <s.vostokov@samsung.com>
Fri, 22 Jun 2018 13:55:55 +0000 (16:55 +0300)
This commit introduced tests for BackendModule/FrontendModule classes

Signed-off-by: Ivan Vagin <ivan.vagin@samsung.com>
contrib/nnc/src/module/BackendModule.test.cpp [new file with mode: 0644]
contrib/nnc/src/module/FrontendModule.test.cpp [new file with mode: 0644]

diff --git a/contrib/nnc/src/module/BackendModule.test.cpp b/contrib/nnc/src/module/BackendModule.test.cpp
new file mode 100644 (file)
index 0000000..9aea8dd
--- /dev/null
@@ -0,0 +1,15 @@
+#include "module/BackendModule.h"
+#include "PluginType.h"
+
+#include "gtest/gtest.h"
+
+using namespace nncc::contrib::module;
+using namespace nncc::contrib::plugin;
+
+TEST(CONTRIB_NNC, BackendModule)
+{
+    AbstractModule *backendModule1 = &BackendModule::getInstance();
+    ASSERT_EQ(backendModule1->getModuleType(), PluginType::typeBackEnd);
+    AbstractModule *backendModule2 = &BackendModule::getInstance();
+    ASSERT_EQ(backendModule1, backendModule2);
+}
diff --git a/contrib/nnc/src/module/FrontendModule.test.cpp b/contrib/nnc/src/module/FrontendModule.test.cpp
new file mode 100644 (file)
index 0000000..fd3be15
--- /dev/null
@@ -0,0 +1,15 @@
+#include "module/FrontendModule.h"
+#include "PluginType.h"
+
+#include "gtest/gtest.h"
+
+using namespace nncc::contrib::module;
+using namespace nncc::contrib::plugin;
+
+TEST(CONTRIB_NNC, FrontendModule)
+{
+    AbstractModule *frontendModule1 = &FrontendModule::getInstance();
+    ASSERT_EQ(frontendModule1->getModuleType(), PluginType::typeFrontEnd);
+    AbstractModule *frontendModule2 = &FrontendModule::getInstance();
+    ASSERT_EQ(frontendModule1, frontendModule2);
+}