]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3785] Made macOS silent
authorFrancis Dupont <fdupont@isc.org>
Wed, 12 Mar 2025 09:22:49 +0000 (10:22 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 26 Mar 2025 15:00:00 +0000 (16:00 +0100)
src/hooks/dhcp/stat_cmds/tests/stat_cmds_unittest.cc
src/lib/dhcpsrv/tests/client_class_def_parser_unittest.cc
src/lib/exceptions/tests/exceptions_unittest.cc
src/lib/util/unittests/interprocess_util.cc

index 642c8736ccb52f97f6e65613ae887384a092df4b..d1abe5e5c452719552a4b0dbf011e5c46ba5eca4 100644 (file)
@@ -626,11 +626,10 @@ TEST_F(StatCmdsTest, multipleLoads) {
     testMultipleLoads();
 }
 
-struct TestScenario {
+struct TestScenario0 {
     std::string description_;
     std::string command_txt_;
     std::string exp_response_;
-    std::string exp_result_json_;
 };
 
 // Verifies detection of invalid v4 input parameters.
@@ -640,7 +639,7 @@ TEST_F(StatCmdsTest, StatLease4GetBadParams) {
     // Initialize lease manager
     initLeaseMgr4();
 
-    std::vector<TestScenario> tests = {
+    std::vector<TestScenario0> tests = {
         {
         "arguments is not a map",
         "{\n"
@@ -798,6 +797,13 @@ TEST_F(StatCmdsTest, StatLease4GetBadParams) {
     }
 }
 
+struct TestScenario {
+    std::string description_;
+    std::string command_txt_;
+    std::string exp_response_;
+    std::string exp_result_json_;
+};
+
 // Verifies result content for valid v4 statistic commands.
 // These test scenarios are all valid, and not expected to throw.
 TEST_F(StatCmdsTest, statLease4GetValid) {
@@ -1061,7 +1067,7 @@ TEST_F(StatCmdsTest, StatLease6GetBadParams) {
     // Initialize lease manager
     initLeaseMgr6();
 
-    std::vector<TestScenario> tests = {
+    std::vector<TestScenario0> tests = {
         {
         "arguments not a map",
         "{\n"
index f22690866b2f2f659a87bcb28e7b206c959cd80f..4318e784e4eced706e592a75b6e16d79fd6cb5d7 100644 (file)
@@ -2213,6 +2213,7 @@ TEST_F(ClientClassDefParserTest, addtionalWithLifetimes4) {
                 "name": "boo",
                 "only-in-additional-list": true
             })",
+            false
         },{
             __LINE__,
             R"({
@@ -2288,6 +2289,7 @@ TEST_F(ClientClassDefParserTest, addtionalWithLifetimes6) {
                 "name": "boo",
                 "only-in-additional-list": true
             })",
+            false
         },{
             __LINE__,
             R"({
index c4b0528305de65538143e3232f3ba8b3ba658f6d..17baf01ac18a0e1568422d4ebe86f11c05ab1df9 100644 (file)
@@ -35,7 +35,8 @@ TEST_F(ExceptionTest, basicMethods) {
     } catch (const Exception& ex) {
         EXPECT_EQ(ex.getMessage(), std::string(teststring));
         EXPECT_EQ(ex.getFile(), std::string(__FILE__));
-        EXPECT_EQ(ex.getLine(), __LINE__ - 4);
+        size_t expected = 5;
+        EXPECT_EQ(expected, __LINE__ - ex.getLine());
     }
 }
 
@@ -46,7 +47,8 @@ TEST_F(ExceptionTest, string) {
     } catch (const Exception& ex) {
         EXPECT_EQ(ex.getMessage(), std::string(teststring));
         EXPECT_EQ(ex.getFile(), std::string(__FILE__));
-        EXPECT_EQ(ex.getLine(), __LINE__ - 4);
+        size_t expected = 5;
+        EXPECT_EQ(expected, __LINE__ - ex.getLine());
     }
 }
 
index dd639ffa59c20a748879ba238c77fa3214abdacd..0537b607cbcf70c2ee6c9fee80fda8b7ad0566e9 100644 (file)
@@ -31,7 +31,7 @@ parentReadState(int fd) {
   if (nfds == 1) {
       // Read status
       const ssize_t bytes_read = read(fd, &result, sizeof(result));
-      EXPECT_EQ(sizeof(result), bytes_read);
+      EXPECT_EQ(static_cast<ssize_t>(sizeof(result)), bytes_read);
   }
 
   return (result);