lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5e7c2fa5: Temporarily allow extra semicolons


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5e7c2fa5: Temporarily allow extra semicolons with certain wx macros
Date: Sat, 30 Jul 2022 18:25:42 -0400 (EDT)

branch: master
commit 5e7c2fa506207e3e9c558ea7dbb5e053199d8a71
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Temporarily allow extra semicolons with certain wx macros
    
    See:
      https://lists.nongnu.org/archive/html/lmi/2022-07/msg00117.html
---
 wx_test_about_version.cpp       |  4 ++--
 wx_test_benchmark_census.cpp    |  2 +-
 wx_test_calculation_summary.cpp |  2 +-
 wx_test_case.hpp                |  5 +++++
 wx_test_create_open.cpp         |  8 ++++----
 wx_test_default_update.cpp      |  2 +-
 wx_test_document.hpp            | 11 ++++++++---
 wx_test_input_sequences.cpp     |  4 ++--
 wx_test_input_validation.cpp    |  2 +-
 wx_test_log_errors.cpp          |  2 +-
 wx_test_new.hpp                 |  2 +-
 wx_test_paste_census.cpp        |  6 +++---
 wx_test_validate_output.cpp     |  8 ++++----
 13 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/wx_test_about_version.cpp b/wx_test_about_version.cpp
index ccb8e640..f8a5f279 100644
--- a/wx_test_about_version.cpp
+++ b/wx_test_about_version.cpp
@@ -246,7 +246,7 @@ LMI_WX_TEST_CASE(about_dialog_version)
             wxTEST_DIALOG
                 (wxYield()
                 ,expect_license_dialog()
-                )//;
+                );
 
             return wxID_OK;
             }
@@ -263,5 +263,5 @@ LMI_WX_TEST_CASE(about_dialog_version)
     wxTEST_DIALOG
         (wxYield()
         ,expect_about_dialog()
-        )//;
+        );
 }
diff --git a/wx_test_benchmark_census.cpp b/wx_test_benchmark_census.cpp
index b981da68..55c65e22 100644
--- a/wx_test_benchmark_census.cpp
+++ b/wx_test_benchmark_census.cpp
@@ -50,7 +50,7 @@ class census_benchmark
         wxTEST_DIALOG
             (wxYield()
             ,wxExpectModal<wxFileDialog>(wxString::FromUTF8(path.string()))
-            )//;
+            );
         wxYield();
         }
 
diff --git a/wx_test_calculation_summary.cpp b/wx_test_calculation_summary.cpp
index 37113e61..49871a60 100644
--- a/wx_test_calculation_summary.cpp
+++ b/wx_test_calculation_summary.cpp
@@ -97,7 +97,7 @@ class expect_preferences_dialog_base
         wxUIActionSimulator ui;
         ui.Char('f', wxMOD_CONTROL);    // "File|Preferences"
 
-        wxTEST_DIALOG(wxYield(), *this)//;
+        wxTEST_DIALOG(wxYield(), *this);
         }
 
     int OnInvoked(MvcController* dialog) const override
diff --git a/wx_test_case.hpp b/wx_test_case.hpp
index 4dd2ef77..2c4e8107 100644
--- a/wx_test_case.hpp
+++ b/wx_test_case.hpp
@@ -26,6 +26,11 @@
 
 #include "path.hpp"
 
+#if defined __clang__
+#   pragma clang diagnostic ignored "-Wextra-semi"
+#   pragma clang diagnostic ignored "-Wextra-semi-stmt"
+#endif // defined __clang__
+
 /// Base class for the test case objects.
 ///
 /// It is only supposed to be used by LMI_WX_TEST_CASE macro and not directly.
diff --git a/wx_test_create_open.cpp b/wx_test_create_open.cpp
index a3b9dda8..620793b5 100644
--- a/wx_test_create_open.cpp
+++ b/wx_test_create_open.cpp
@@ -64,7 +64,7 @@ void do_test_create_open
             (wxYield()
             ,wxExpectDismissableModal<MvcController>(wxID_OK).
                 Describe("new file properties")
-            )//;
+            );
         }
     wxYield();
 
@@ -72,7 +72,7 @@ void do_test_create_open
     wxTEST_DIALOG
         (wxYield()
         ,wxExpectModal<wxFileDialog>(file).Describe("save file dialog")
-        )//;
+        );
     wxYield();
 
     LMI_ASSERT(output_file.exists());
@@ -89,14 +89,14 @@ void do_test_create_open
             ,wxExpectModal<wxFileDialog>(file).Describe("open file dialog")
             ,wxExpectDismissableModal<MvcController>(wxID_OK).
                 Describe("existing file properties")
-            )//;
+            );
         }
     else
         {
         wxTEST_DIALOG
             (wxYield()
             ,wxExpectModal<wxFileDialog>(file).Describe("open file dialog")
-            )//;
+            );
         }
     wxYield();
 
diff --git a/wx_test_default_update.cpp b/wx_test_default_update.cpp
index 7118c24b..a4ec456e 100644
--- a/wx_test_default_update.cpp
+++ b/wx_test_default_update.cpp
@@ -149,7 +149,7 @@ LMI_WX_TEST_CASE(default_update)
     wxTEST_DIALOG
         (wxYield()
         ,change_dob_in_defaults_dialog()
-        )//;
+        );
 
     // Save the default document.
     ui.Char('s', wxMOD_CONTROL); // "File|Save"
diff --git a/wx_test_document.hpp b/wx_test_document.hpp
index 73b229d9..f3099e95 100644
--- a/wx_test_document.hpp
+++ b/wx_test_document.hpp
@@ -32,6 +32,11 @@
 
 #include <exception>                    // uncaught_exceptions()
 
+#if defined __clang__
+#   pragma clang diagnostic ignored "-Wextra-semi"
+#   pragma clang diagnostic ignored "-Wextra-semi-stmt"
+#endif // defined __clang__
+
 /// Helper function for finding and focusing a control with the specified name
 /// inside MvcController (actually it could be any top level window containing
 /// a book control).
@@ -78,7 +83,7 @@ class wx_test_document_base
                 wxTEST_DIALOG
                     (wxYield()
                     ,wxExpectModal<wxMessageDialog>(wxNO).Optional()
-                    )//;
+                    );
                 }
             else
                 {
@@ -108,7 +113,7 @@ class wx_test_document_base
         wxTEST_DIALOG(wxYield()
                      ,wxExpectModal<wxMessageDialog>(wxNO).
                         Describe("message box confirming closing modified 
file")
-                     )//;
+                     );
     }
 
   protected:
@@ -156,7 +161,7 @@ class wx_test_existing_illustration
             ,wxExpectModal<wxFileDialog>(file_ill)
             ,wxExpectDismissableModal<MvcController>(wxID_OK)
                 .Describe("illustration properties for " + file_ill)
-            )//;
+            );
 
         set_opened();
     }
diff --git a/wx_test_input_sequences.cpp b/wx_test_input_sequences.cpp
index 5e57173c..eb38f787 100644
--- a/wx_test_input_sequences.cpp
+++ b/wx_test_input_sequences.cpp
@@ -139,7 +139,7 @@ LMI_WX_TEST_CASE(input_sequences)
                 (wxYield()
                 ,wxExpectDismissableModal<wxDialog>(wxOK).
                     Describe("sequence entry dialog" + sequence_describe())
-                )//;
+                );
 
             return wxID_OK;
             }
@@ -165,7 +165,7 @@ LMI_WX_TEST_CASE(input_sequences)
     for(auto const& test : test_cases)
         {
         ui.Char('e', wxMOD_CONTROL); // "Illustration|Edit Cell"
-        wxTEST_DIALOG(wxYield(), test_sequence_dialog(test))//;
+        wxTEST_DIALOG(wxYield(), test_sequence_dialog(test));
         }
 
     ill.close_discard_changes();
diff --git a/wx_test_input_validation.cpp b/wx_test_input_validation.cpp
index 4c090a31..ef5228c7 100644
--- a/wx_test_input_validation.cpp
+++ b/wx_test_input_validation.cpp
@@ -154,7 +154,7 @@ LMI_WX_TEST_CASE(input_validation)
             wxTEST_DIALOG
                 (wxYield()
                 ,test_coi_multiplier_dialog(td.value)
-                )//;
+                );
 
             // A special case: when using one of the special command line back
             // door options, the test for the minimal COI multiplier value is
diff --git a/wx_test_log_errors.cpp b/wx_test_log_errors.cpp
index b0ded7f0..db629391 100644
--- a/wx_test_log_errors.cpp
+++ b/wx_test_log_errors.cpp
@@ -42,5 +42,5 @@ LMI_WX_TEST_CASE(log_error)
         (wxLog::FlushActive()
         ,wxExpectModal<wxMessageDialog>(wxOK).
             Describe("warning about being unable to determine file format")
-        )//;
+        );
 }
diff --git a/wx_test_new.hpp b/wx_test_new.hpp
index 8203c343..fcc0e61e 100644
--- a/wx_test_new.hpp
+++ b/wx_test_new.hpp
@@ -59,7 +59,7 @@ class wx_test_new_illustration
         ui.Char('n', wxMOD_CONTROL);    // "File|New"
         ui.Char('i');                   // "Illustration"
 
-        wxTEST_DIALOG(wxYield(), e)//;
+        wxTEST_DIALOG(wxYield(), e);
 
         set_opened();
     }
diff --git a/wx_test_paste_census.cpp b/wx_test_paste_census.cpp
index 584238e2..0178a5df 100644
--- a/wx_test_paste_census.cpp
+++ b/wx_test_paste_census.cpp
@@ -318,7 +318,7 @@ LMI_WX_TEST_CASE(paste_census)
         ,change_gender_in_class_defaults_dialog()
         ,wxExpectModal<wxMessageDialog>(wxYES).
             Describe("message box asking whether to apply gender changes to 
all")
-        )//;
+        );
 
     // Check that all columns, including the "Gender" one, are still shown.
     check_grid_columns
@@ -384,7 +384,7 @@ LMI_WX_TEST_CASE(paste_census)
         ,change_class_in_case_defaults_dialog()
         ,wxExpectModal<wxMessageDialog>(wxYES).
             Describe("message box asking whether to apply class changes to 
all")
-        )//;
+        );
 
     // Check that we still have the same cells but that now the underwriting
     // class column has disappeared as its value has been fixed.
@@ -407,7 +407,7 @@ LMI_WX_TEST_CASE(paste_census)
         (wxYield()
         ,wxExpectModal<wxFileDialog>(census_file_name).
             Describe("census save file dialog")
-        )//;
+        );
 
     LMI_ASSERT(output_cns.exists());
 
diff --git a/wx_test_validate_output.cpp b/wx_test_validate_output.cpp
index ead9805f..ea98a7fb 100644
--- a/wx_test_validate_output.cpp
+++ b/wx_test_validate_output.cpp
@@ -152,7 +152,7 @@ void init_test_census
         ,change_corp_in_case_defaults_dialog(corp_name)
         ,wxExpectModal<wxMessageDialog>(wxYES).
             Describe("message box asking whether to apply changes to all 
cells")
-        )//;
+        );
 
     // Change the cell.
     struct change_name_in_cell_dialog
@@ -189,7 +189,7 @@ void init_test_census
     wxTEST_DIALOG
         (wxYield()
         ,change_name_in_cell_dialog(insured_name)
-        )//;
+        );
 
     ui.Char('+', wxMOD_CONTROL); // "Census|Add cell"
     wxYield();
@@ -532,7 +532,7 @@ LMI_WX_TEST_CASE(validate_output_census)
         (wxYield()
         ,wxExpectModal<wxFileDialog>(census_file_name).
             Describe("census save file dialog")
-        )//;
+        );
 
     LMI_ASSERT(output_cns.exists());
 
@@ -574,7 +574,7 @@ LMI_WX_TEST_CASE(validate_output_mec)
         (wxYield()
         ,wxExpectDismissableModal<MvcController>(wxID_OK).
             Describe("new MEC parameters dialog")
-        )//;
+        );
 
     ui.Char('l', wxMOD_CONTROL);    // "File|Close"
     wxYield();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]