mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-07-22 20:14:11 +00:00
Fix broken tests for supporting exclude_setjmp. Verify cexception won't be run when this is enabled.
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user