diff --git a/test/unit/cmock_generator_main_test.rb b/test/unit/cmock_generator_main_test.rb index 8462412..ca72fe4 100644 --- a/test/unit/cmock_generator_main_test.rb +++ b/test/unit/cmock_generator_main_test.rb @@ -55,6 +55,7 @@ describe CMockGenerator, "Verify CMockGenerator Module" do @config.expect :subdir, nil @config.expect :fail_on_unexpected_calls, true @config.expect :treat_inlines, :exclude + @config.expect :exclude_setjmp_h, false @cmock_generator = CMockGenerator.new(@config, @file_writer, @utils, @plugins) @cmock_generator.module_name = @module_name @cmock_generator.module_ext = '.h' @@ -75,6 +76,7 @@ describe CMockGenerator, "Verify CMockGenerator Module" do @config.expect :subdir, nil @config.expect :fail_on_unexpected_calls, true @config.expect :treat_inlines, :exclude + @config.expect :exclude_setjmp_h, false @cmock_generator_strict = CMockGenerator.new(@config, @file_writer, @utils, @plugins) @cmock_generator_strict.module_name = @module_name @cmock_generator_strict.module_ext = '.h' @@ -145,6 +147,7 @@ describe CMockGenerator, "Verify CMockGenerator Module" do @config.expect :subdir, nil @config.expect :fail_on_unexpected_calls, true @config.expect :treat_inlines, :exclude + @config.expect :exclude_setjmp_h, false @cmock_generator2 = CMockGenerator.new(@config, @file_writer, @utils, @plugins) @cmock_generator2.module_name = "Pout-Pout Fish" @cmock_generator2.module_ext = '.h' diff --git a/test/unit/cmock_generator_plugin_cexception_test.rb b/test/unit/cmock_generator_plugin_cexception_test.rb index 19699ea..8bd2c92 100644 --- a/test/unit/cmock_generator_plugin_cexception_test.rb +++ b/test/unit/cmock_generator_plugin_cexception_test.rb @@ -11,6 +11,9 @@ describe CMockGeneratorPluginCexception, "Verify CMockGeneratorPluginCexception before do create_mocks :config, :utils + + @config.expect :exclude_setjmp_h, false + @cmock_generator_plugin_cexception = CMockGeneratorPluginCexception.new(@config, @utils) end @@ -93,4 +96,13 @@ describe CMockGeneratorPluginCexception, "Verify CMockGeneratorPluginCexception assert_equal(expected, returned) end + it "should throw an exception if we try to use this plugin when setjmp disabled" do + + @config.expect :exclude_setjmp_h, true + + assert_raises RuntimeError do + @cmock_generator_plugin_cexception = CMockGeneratorPluginCexception.new(@config, @utils) + end + end + end diff --git a/test/unit/cmock_plugin_manager_test.rb b/test/unit/cmock_plugin_manager_test.rb index f9f0e64..abe012a 100644 --- a/test/unit/cmock_plugin_manager_test.rb +++ b/test/unit/cmock_plugin_manager_test.rb @@ -18,7 +18,8 @@ describe CMockPluginManager, "Verify CMockPluginManager Module" do :respond_to => true, :when_ptr => :compare_data, :enforce_strict_ordering => false, - :ignore => :args_and_calls + :ignore => :args_and_calls, + :exclude_setjmp_h => false ) def @config.plugins