Unittest for Exception::what (#708)
authorEfimov Alexander/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com>
Thu, 19 Jul 2018 09:30:13 +0000 (12:30 +0300)
committer박종현/동작제어Lab(SR)/Staff Engineer/삼성전자 <jh1302.park@samsung.com>
Thu, 19 Jul 2018 09:30:13 +0000 (18:30 +0900)
Implement test for Exception::what() method

Signed-off-by: Efimov Alexander <a.efimov@samsung.com>
libs/foundation/src/Exception.test.cpp

index e96ab46..da87317 100644 (file)
@@ -45,6 +45,13 @@ TEST(FOUNDATION_EXCEPTION, Exception)
   catch (Exception &e)
   {
     ASSERT_TRUE(msgs == e.getInfo());
+
+    std::string glued;
+    const char delim[] = "\n";
+    glued.append(errorMsg1).append(delim);
+    glued.append(errorMsg2).append(delim);
+    glued.append(errorMsg3).append(delim);
+    ASSERT_TRUE(glued == e.what());
     return;
   }