Browse Source

Fix leftover weak warnings in test suite

Patrick-Christopher Mattulat 1 year ago
parent
commit
bc3eeda66f

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

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-02-22
+ * Changed:         2023-02-24
  *
  * */
 
@@ -94,9 +94,6 @@ namespace
 
     ASSERT_FALSE(expressionA && expressionB);
     ASSERT_FALSE(expressionB && expressionA);
-    ASSERT_FALSE(expressionB && (3 == 4));
-    ASSERT_FALSE(expressionB && 0);
-    ASSERT_FALSE(expressionB && false);
   }
 
   TEST_F(BooleanTest, operator_or)
@@ -106,8 +103,6 @@ namespace
 
     ASSERT_TRUE(expressionA || expressionB);
     ASSERT_TRUE(expressionB || expressionA);
-    ASSERT_TRUE(expressionA || 1);
-    ASSERT_TRUE(expressionA || true);
     ASSERT_TRUE(1 || expressionA.getValue());
   }
 

+ 7 - 3
test/cases/boxing/IntegerTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-09
- * Changed:         2023-02-22
+ * Changed:         2023-02-24
  *
  * */
 
@@ -399,13 +399,17 @@ namespace
   TEST_F(IntegerTest, operator_or_with_value)
   {
     Integer x{};
-    ASSERT_TRUE(x || 1);
+    bool orWithValue = x || 1;
+
+    ASSERT_TRUE(orWithValue);
   }
 
   TEST_F(IntegerTest, operator_or_with_boolean)
   {
     Integer x{};
-    ASSERT_TRUE(x || true);
+    bool orWithBoolean = x || true;
+
+    ASSERT_TRUE(orWithBoolean);
   }
 
   // increment / decrement operator

+ 7 - 3
test/cases/boxing/LongTest.cpp

@@ -3,7 +3,7 @@
  * Company:         Lynar Studios
  * E-Mail:          webmaster@lynarstudios.com
  * Created:         2020-08-17
- * Changed:         2023-02-22
+ * Changed:         2023-02-24
  *
  * */
 
@@ -401,13 +401,17 @@ namespace
   TEST_F(LongTest, operator_or_with_value)
   {
     Long x{};
-    ASSERT_TRUE(x || (long_type) 1);
+    bool orWithValue = x || (long_type) 1;
+
+    ASSERT_TRUE(orWithValue);
   }
 
   TEST_F(LongTest, operator_or_with_boolean)
   {
     Long x{};
-    ASSERT_TRUE(x || true);
+    bool orWithBoolean = x || true;
+
+    ASSERT_TRUE(orWithBoolean);
   }
 
   // increment / decrement operator