diff --git a/test/unit/cmock_generator_main_test.rb b/test/unit/cmock_generator_main_test.rb index e051a3d..cfc715e 100644 --- a/test/unit/cmock_generator_main_test.rb +++ b/test/unit/cmock_generator_main_test.rb @@ -100,7 +100,9 @@ describe CMockGenerator, "Verify CMockGenerator Module" do "\n", "/* Ignore the following warnings, since we are copying code */\n", "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n", + "#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0)))\n", "#pragma GCC diagnostic push\n", + "#endif\n", "#if !defined(__clang__)\n", "#pragma GCC diagnostic ignored \"-Wpragmas\"\n", "#endif\n", @@ -154,7 +156,9 @@ describe CMockGenerator, "Verify CMockGenerator Module" do "\n", "/* Ignore the following warnings, since we are copying code */\n", "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n", + "#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0)))\n", "#pragma GCC diagnostic push\n", + "#endif\n", "#if !defined(__clang__)\n", "#pragma GCC diagnostic ignored \"-Wpragmas\"\n", "#endif\n", @@ -190,7 +194,9 @@ describe CMockGenerator, "Verify CMockGenerator Module" do "\n", "/* Ignore the following warnings, since we are copying code */\n", "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n", + "#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0)))\n", "#pragma GCC diagnostic push\n", + "#endif\n", "#if !defined(__clang__)\n", "#pragma GCC diagnostic ignored \"-Wpragmas\"\n", "#endif\n", @@ -227,7 +233,9 @@ describe CMockGenerator, "Verify CMockGenerator Module" do "\n", "/* Ignore the following warnings, since we are copying code */\n", "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n", + "#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0)))\n", "#pragma GCC diagnostic push\n", + "#endif\n", "#if !defined(__clang__)\n", "#pragma GCC diagnostic ignored \"-Wpragmas\"\n", "#endif\n", @@ -281,8 +289,10 @@ describe CMockGenerator, "Verify CMockGenerator Module" do output = [] expected = ["\n", "#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n", + "#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0)))\n", "#pragma GCC diagnostic pop\n", "#endif\n", + "#endif\n", "\n", "#endif\n" ]