mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2026-08-24 03:59:57 +00:00
- tweaked parameterized tests to be C99 standards compliant
- fixed a few bugs in fixtures to get it to pass against our standard compilers - added extern of OUTPUT_CHAR method to keep compilers from complaining git-svn-id: http://unity.svn.sourceforge.net/svnroot/unity/trunk@107 e7d17a6e-8845-0410-bbbc-c8efb4fdad7e
This commit is contained in:
@@ -8,16 +8,19 @@ require 'yaml'
|
||||
require 'fileutils'
|
||||
require HERE+'../../auto/unity_test_summary'
|
||||
require HERE+'../../auto/generate_test_runner'
|
||||
require HERE+'../../auto/colour_reporter'
|
||||
require HERE+'../../auto/colour_reporter'
|
||||
|
||||
module RakefileHelpers
|
||||
|
||||
C_EXTENSION = '.c'
|
||||
|
||||
def load_configuration(config_file)
|
||||
$cfg_file = HERE+"../../targets/#{config_file}" unless $cfg_file =~ /[\\|\/]/
|
||||
$cfg = YAML.load(File.read($cfg_file))
|
||||
$colour_output = false unless $cfg['colour']
|
||||
unless ($configured)
|
||||
$cfg_file = HERE+"../../targets/#{config_file}" unless (config_file =~ /[\\|\/]/)
|
||||
$cfg = YAML.load(File.read($cfg_file))
|
||||
$colour_output = false unless $cfg['colour']
|
||||
$configured = true if (config_file != DEFAULT_CONFIG_FILE)
|
||||
end
|
||||
end
|
||||
|
||||
def configure_clean
|
||||
@@ -159,7 +162,7 @@ module RakefileHelpers
|
||||
simulator = build_simulator_fields
|
||||
executable = $cfg['linker']['bin_files']['destination'] + test_base + $cfg['linker']['bin_files']['extension']
|
||||
if simulator.nil?
|
||||
cmd_str = executable + " -v -r 8"
|
||||
cmd_str = executable + " -v -r"
|
||||
else
|
||||
cmd_str = "#{simulator[:command]} #{simulator[:pre_support]} #{executable} #{simulator[:post_support]}"
|
||||
end
|
||||
@@ -171,6 +174,5 @@ module RakefileHelpers
|
||||
test_results += '.testpass'
|
||||
end
|
||||
File.open(test_results, 'w') { |f| f.print output }
|
||||
puts output
|
||||
end
|
||||
end
|
||||
|
||||
@@ -297,7 +297,7 @@ TEST(LeakDetection, BufferOverrunFoundDuringFree)
|
||||
{
|
||||
void* m = malloc(10);
|
||||
char* s = (char*)m;
|
||||
s[10] = -1;
|
||||
s[10] = (char)0xFF;
|
||||
UnityOutputCharSpy_Enable(1);
|
||||
EXPECT_ABORT_BEGIN
|
||||
free(m);
|
||||
@@ -312,7 +312,7 @@ TEST(LeakDetection, BufferOverrunFoundDuringRealloc)
|
||||
{
|
||||
void* m = malloc(10);
|
||||
char* s = (char*)m;
|
||||
s[10] = -1;
|
||||
s[10] = (char)0xFF;
|
||||
UnityOutputCharSpy_Enable(1);
|
||||
EXPECT_ABORT_BEGIN
|
||||
m = realloc(m, 100);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
|
||||
#include "unity_output_Spy.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user