mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-08-05 10:47:49 +00:00
- fixed error in docs
- make unity optional (even though we don't fully support any other framework yet) git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@163 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -8,6 +8,7 @@ class CMockConfig
|
||||
|
||||
CMockDefaultOptions =
|
||||
{
|
||||
:framework => :unity,
|
||||
:mock_path => 'mocks',
|
||||
:mock_prefix => 'Mock',
|
||||
:plugins => [],
|
||||
|
||||
@@ -17,6 +17,7 @@ class CMockGenerator
|
||||
@config = config
|
||||
@prefix = @config.mock_prefix
|
||||
@ordered = @config.enforce_strict_ordering
|
||||
@framework = @config.framework.to_s
|
||||
end
|
||||
|
||||
def create_mock(module_name, parsed_stuff)
|
||||
@@ -86,7 +87,7 @@ class CMockGenerator
|
||||
file << "#include <string.h>\n"
|
||||
file << "#include <stdlib.h>\n"
|
||||
file << "#include <setjmp.h>\n"
|
||||
file << "#include \"unity.h\"\n"
|
||||
file << "#include \"#{@framework}.h\"\n"
|
||||
file << "#include \"cmock.h\"\n"
|
||||
file << @plugins.run(:include_files)
|
||||
includes = @config.includes
|
||||
|
||||
@@ -172,6 +172,7 @@ module RakefileHelpers
|
||||
results = Dir[results_glob]
|
||||
summary.set_targets(results)
|
||||
summary.run
|
||||
raise "There were failures" if (summary.failures > 0)
|
||||
end
|
||||
|
||||
def run_system_test_interactions(test_case_files)
|
||||
|
||||
@@ -43,6 +43,7 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
#no strict handling
|
||||
@config.expect.mock_prefix.returns("Mock")
|
||||
@config.expect.enforce_strict_ordering.returns(false)
|
||||
@config.expect.framework.returns(:unity)
|
||||
@cmock_generator = CMockGenerator.new(@config, @file_writer, @utils, @plugins)
|
||||
@cmock_generator.module_name = @module_name
|
||||
@cmock_generator.mock_name = "Mock#{@module_name}"
|
||||
@@ -50,6 +51,7 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
#strict handling
|
||||
@config.expect.mock_prefix.returns("Mock")
|
||||
@config.expect.enforce_strict_ordering.returns(true)
|
||||
@config.expect.framework.returns(:unity)
|
||||
@cmock_generator_strict = CMockGenerator.new(@config, @file_writer, @utils, @plugins)
|
||||
@cmock_generator_strict.module_name = @module_name
|
||||
@cmock_generator_strict.mock_name = "Mock#{@module_name}"
|
||||
|
||||
Reference in New Issue
Block a user