mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-01-23 00:15:58 +01:00
- make test runner handle spaces and dashes in file names
This commit is contained in:
@@ -176,21 +176,24 @@ class UnityTestRunnerGenerator
|
|||||||
output.puts(" GlobalOrderError = NULL;")
|
output.puts(" GlobalOrderError = NULL;")
|
||||||
end
|
end
|
||||||
mocks.each do |mock|
|
mocks.each do |mock|
|
||||||
output.puts(" #{mock}_Init();")
|
mock_clean = mock.gsub(/(?:-|\s+)/, "_")
|
||||||
|
output.puts(" #{mock_clean}_Init();")
|
||||||
end
|
end
|
||||||
output.puts("}\n")
|
output.puts("}\n")
|
||||||
|
|
||||||
output.puts("static void CMock_Verify(void)")
|
output.puts("static void CMock_Verify(void)")
|
||||||
output.puts("{")
|
output.puts("{")
|
||||||
mocks.each do |mock|
|
mocks.each do |mock|
|
||||||
output.puts(" #{mock}_Verify();")
|
mock_clean = mock.gsub(/(?:-|\s+)/, "_")
|
||||||
|
output.puts(" #{mock_clean}_Verify();")
|
||||||
end
|
end
|
||||||
output.puts("}\n")
|
output.puts("}\n")
|
||||||
|
|
||||||
output.puts("static void CMock_Destroy(void)")
|
output.puts("static void CMock_Destroy(void)")
|
||||||
output.puts("{")
|
output.puts("{")
|
||||||
mocks.each do |mock|
|
mocks.each do |mock|
|
||||||
output.puts(" #{mock}_Destroy();")
|
mock_clean = mock.gsub(/(?:-|\s+)/, "_")
|
||||||
|
output.puts(" #{mock_clean}_Destroy();")
|
||||||
end
|
end
|
||||||
output.puts("}\n")
|
output.puts("}\n")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ require HERE+'rakefile_helper'
|
|||||||
include RakefileHelpers
|
include RakefileHelpers
|
||||||
|
|
||||||
# Load default configuration, for now
|
# Load default configuration, for now
|
||||||
DEFAULT_CONFIG_FILE = 'gcc.yml'
|
DEFAULT_CONFIG_FILE = 'gcc_32.yml'
|
||||||
configure_toolchain(DEFAULT_CONFIG_FILE)
|
configure_toolchain(DEFAULT_CONFIG_FILE)
|
||||||
|
|
||||||
task :unit do
|
task :unit do
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ require HERE + 'rakefile_helper'
|
|||||||
include RakefileHelpers
|
include RakefileHelpers
|
||||||
|
|
||||||
# Load default configuration, for now
|
# Load default configuration, for now
|
||||||
DEFAULT_CONFIG_FILE = 'gcc.yml'
|
DEFAULT_CONFIG_FILE = 'gcc_32.yml'
|
||||||
configure_toolchain(DEFAULT_CONFIG_FILE)
|
configure_toolchain(DEFAULT_CONFIG_FILE)
|
||||||
|
|
||||||
task :unit do
|
task :unit do
|
||||||
|
|||||||
@@ -107,12 +107,8 @@ void UnityTestRunner(unityfunction* setup,
|
|||||||
UnityPointer_UndoAllSets();
|
UnityPointer_UndoAllSets();
|
||||||
if (!Unity.CurrentTestFailed)
|
if (!Unity.CurrentTestFailed)
|
||||||
UnityMalloc_EndTest();
|
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;
|
return oldMem;
|
||||||
|
|
||||||
newMem = unity_malloc(size);
|
newMem = unity_malloc(size);
|
||||||
memcpy(newMem, oldMem, size);
|
memcpy(newMem, oldMem, guard->size);
|
||||||
unity_free(oldMem);
|
unity_free(oldMem);
|
||||||
return newMem;
|
return newMem;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user