提交 97000e01 编写于 作者: M mvandervoord

- make test runner handle spaces and dashes in file names

上级 292a6eac
......@@ -176,21 +176,24 @@ class UnityTestRunnerGenerator
output.puts(" GlobalOrderError = NULL;")
end
mocks.each do |mock|
output.puts(" #{mock}_Init();")
mock_clean = mock.gsub(/(?:-|\s+)/, "_")
output.puts(" #{mock_clean}_Init();")
end
output.puts("}\n")
output.puts("static void CMock_Verify(void)")
output.puts("{")
mocks.each do |mock|
output.puts(" #{mock}_Verify();")
mock_clean = mock.gsub(/(?:-|\s+)/, "_")
output.puts(" #{mock_clean}_Verify();")
end
output.puts("}\n")
output.puts("static void CMock_Destroy(void)")
output.puts("{")
mocks.each do |mock|
output.puts(" #{mock}_Destroy();")
mock_clean = mock.gsub(/(?:-|\s+)/, "_")
output.puts(" #{mock_clean}_Destroy();")
end
output.puts("}\n")
end
......
......@@ -8,7 +8,7 @@ require HERE+'rakefile_helper'
include RakefileHelpers
# Load default configuration, for now
DEFAULT_CONFIG_FILE = 'gcc.yml'
DEFAULT_CONFIG_FILE = 'gcc_32.yml'
configure_toolchain(DEFAULT_CONFIG_FILE)
task :unit do
......
......@@ -14,7 +14,7 @@ require HERE + 'rakefile_helper'
include RakefileHelpers
# Load default configuration, for now
DEFAULT_CONFIG_FILE = 'gcc.yml'
DEFAULT_CONFIG_FILE = 'gcc_32.yml'
configure_toolchain(DEFAULT_CONFIG_FILE)
task :unit do
......
......@@ -107,12 +107,8 @@ void UnityTestRunner(unityfunction* setup,
UnityPointer_UndoAllSets();
if (!Unity.CurrentTestFailed)
UnityMalloc_EndTest();
UnityConcludeFixtureTest();
}
else
{
//aborting - jwg - di i need these for the other TEST_PROTECTS?
}
UnityConcludeFixtureTest();
}
}
......@@ -254,7 +250,7 @@ void* unity_realloc(void * oldMem, size_t size)
return oldMem;
newMem = unity_malloc(size);
memcpy(newMem, oldMem, size);
memcpy(newMem, oldMem, guard->size);
unity_free(oldMem);
return newMem;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册