瀏覽代碼

Improve Boolean class test coverage

- add missing test cases
Patrick-Christopher Mattulat 3 年之前
父節點
當前提交
6f80d54bf5
共有 1 個文件被更改,包括 15 次插入1 次删除
  1. 15 1
      test/cases/boxing/BooleanTest.cpp

+ 15 - 1
test/cases/boxing/BooleanTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2021-07-08
+ * Changed:         2021-07-14
  *
  * */
 
@@ -148,6 +148,20 @@ namespace
     ASSERT_FALSE(expression);
   }
 
+  TEST_F(BooleanTest, parse_with_invalid_parameter)
+  {
+    EXPECT_THROW({
+                   try
+                   {
+                     ls_std::Boolean expression{};
+                     expression.parse("hello");
+                   } catch (const ls_std::IllegalArgumentException &_exception)
+                   {
+                     throw;
+                   }
+                 }, ls_std::IllegalArgumentException);
+  }
+
   TEST_F(BooleanTest, toString_true)
   {
     ls_std::Boolean expression{2 < 3};