From 923835236bd235b62f56bd5fe1b4c185c80325da Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Mon, 24 Aug 2026 19:33:35 -0400 Subject: [PATCH] Tweak test so that local configuration isn't falsely reporting that we don't have 100% test coverage. --- lib/CException.h | 2 +- project.yml | 4 ++-- test/support/CExceptionConfig.h | 16 +++++----------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/lib/CException.h b/lib/CException.h index 6b6cf10..3b9cc1a 100644 --- a/lib/CException.h +++ b/lib/CException.h @@ -18,7 +18,7 @@ extern "C" #define CEXCEPTION_VERSION_MAJOR 1 #define CEXCEPTION_VERSION_MINOR 3 -#define CEXCEPTION_VERSION_BUILD 4 +#define CEXCEPTION_VERSION_BUILD 5 #define CEXCEPTION_VERSION ((CEXCEPTION_VERSION_MAJOR << 16) | (CEXCEPTION_VERSION_MINOR << 8) | CEXCEPTION_VERSION_BUILD) //To Use CException, you have a number of options: diff --git a/project.yml b/project.yml index 3cbb30f..5baa328 100644 --- a/project.yml +++ b/project.yml @@ -231,8 +231,8 @@ #- ReportGenerator # Use ReportGenerator to create the specified reports. :reports: # Specify one or more reports to generate. # Make an HTML summary report. - - HtmlBasic - # - HtmlDetailed + # - HtmlBasic + - HtmlDetailed # - Text # - Cobertura # - SonarQube diff --git a/test/support/CExceptionConfig.h b/test/support/CExceptionConfig.h index d4aee17..6c57faf 100644 --- a/test/support/CExceptionConfig.h +++ b/test/support/CExceptionConfig.h @@ -20,17 +20,11 @@ extern volatile int TestingTheFallbackId; #define CEXCEPTION_NONE (1234) // Optionally define a special handler for unhandled exceptions -#define CEXCEPTION_NO_CATCH_HANDLER(id) \ -{ \ - if (!TestingTheFallback) \ - { \ - TEST_FAIL_MESSAGE("Unexpected Exception!"); \ - } \ - else \ - { \ - TestingTheFallbackId = id; \ - TestingTheFallback--; \ - } \ +#define CEXCEPTION_NO_CATCH_HANDLER(id) \ +{ \ + TEST_ASSERT_GREATER_THAN_INT_MESSAGE(0, TestingTheFallback, "Unexpected Exception!"); \ + TestingTheFallbackId = id; \ + TestingTheFallback--; \ } // Multi-Tasking environments will need a couple of macros defined to make this library