incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1528380 [4/5] - in /incubator/celix/trunk: ./ cmake/ cmake/cmock/ cmake/cmock/config/ cmake/cmock/lib/ cmake/cmock/src/ cmake/cpputest/ cmake/cpputest/include/ cmake/cpputest/include/CppUTest/ cmake/cpputest/include/CppUTestExt/ cmake/cppu...
Date Wed, 02 Oct 2013 09:01:23 GMT
Added: incubator/celix/trunk/cmake/unity/generate_module.rb
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/unity/generate_module.rb?rev=1528380&view=auto
==============================================================================
--- incubator/celix/trunk/cmake/unity/generate_module.rb (added)
+++ incubator/celix/trunk/cmake/unity/generate_module.rb Wed Oct  2 09:01:20 2013
@@ -0,0 +1,202 @@
+# ==========================================
+#   Unity Project - A Test Framework for C
+#   Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
+#   [Released under MIT License. Please refer to license.txt for details]
+# ========================================== 
+
+# This script creates all the files with start code necessary for a new module.
+# A simple module only requires a source file, header file, and test file.
+# Triad modules require a source, header, and test file for each triad type (like model, conductor, and hardware).
+
+require 'rubygems'
+require 'fileutils'
+
+HERE = File.expand_path(File.dirname(__FILE__)) + '/'
+
+#help text when requested
+HELP_TEXT = [ "\nGENERATE MODULE\n-------- ------",
+              "\nUsage: ruby generate_module [options] module_name",
+              "  -i\"include\" sets the path to output headers to 'include' (DEFAULT ../src)",
+              "  -s\"../src\"  sets the path to output source to '../src'   (DEFAULT ../src)",
+              "  -t\"C:/test\" sets the path to output source to 'C:/test'  (DEFAULT ../test)",
+              "  -p\"MCH\"     sets the output pattern to MCH.",
+              "              dh  - driver hardware.",
+              "              dih - driver interrupt hardware.",
+              "              mch - model conductor hardware.",
+              "              mvp - model view presenter.",
+              "              src - just a single source module. (DEFAULT)",
+              "  -d          destroy module instead of creating it.",
+              "  -u          update subversion too (requires subversion command line)",
+              "  -y\"my.yml\"  selects a different yaml config file for module generation",
+              "" ].join("\n")
+
+#Built in patterns
+PATTERNS = { 'src' => {''         => { :inc => [] } },
+             'dh'  => {'Driver'   => { :inc => ['%1$sHardware.h'] }, 
+                       'Hardware' => { :inc => [] } 
+                      },
+             'dih' => {'Driver'   => { :inc => ['%1$sHardware.h', '%1$sInterrupt.h'] }, 
+                       'Interrupt'=> { :inc => ['%1$sHardware.h'] },
+                       'Hardware' => { :inc => [] } 
+                      },
+             'mch' => {'Model'    => { :inc => [] }, 
+                       'Conductor'=> { :inc => ['%1$sModel.h', '%1$sHardware.h'] },
+                       'Hardware' => { :inc => [] } 
+                      },
+             'mvp' => {'Model'    => { :inc => [] }, 
+                       'Presenter'=> { :inc => ['%1$sModel.h', '%1$sView.h'] },
+                       'View'     => { :inc => [] } 
+                      }
+           }
+
+#TEMPLATE_TST
+TEMPLATE_TST = %q[#include "unity.h"
+%2$s#include "%1$s.h"
+
+void setUp(void)
+{
+}
+
+void tearDown(void)
+{
+}
+
+void test_%1$s_NeedToImplement(void)
+{
+    TEST_IGNORE();
+}
+]
+
+#TEMPLATE_SRC
+TEMPLATE_SRC = %q[%2$s#include "%1$s.h"
+]
+
+#TEMPLATE_INC
+TEMPLATE_INC = %q[#ifndef _%3$s_H
+#define _%3$s_H%2$s
+
+#endif // _%3$s_H
+]
+
+# Parse the command line parameters.
+ARGV.each do |arg|
+  case(arg)
+    when /^-d/      then @destroy = true
+    when /^-u/      then @update_svn = true
+    when /^-p(\w+)/ then @pattern = $1
+    when /^-s(.+)/  then @path_src = $1
+    when /^-i(.+)/  then @path_inc = $1
+    when /^-t(.+)/  then @path_tst = $1
+    when /^-y(.+)/  then @yaml_config = $1
+    when /^(\w+)/
+      raise "ERROR: You can't have more than one Module name specified!" unless @module_name.nil?
+      @module_name = arg
+    when /^-(h|-help)/ 
+      puts HELP_TEXT
+      exit
+    else
+      raise "ERROR: Unknown option specified '#{arg}'"
+  end
+end
+raise "ERROR: You must have a Module name specified! (use option -h for help)" if @module_name.nil?
+
+#load yaml file if one was requested
+if @yaml_config
+  require 'yaml'
+  cfg = YAML.load_file(HERE + @yaml_config)[:generate_module]
+  @path_src     = cfg[:defaults][:path_src]   if @path_src.nil?
+  @path_inc     = cfg[:defaults][:path_inc]   if @path_inc.nil?
+  @path_tst     = cfg[:defaults][:path_tst]   if @path_tst.nil?
+  @update_svn   = cfg[:defaults][:update_svn] if @update_svn.nil?
+  @extra_inc    = cfg[:includes]
+  @boilerplates = cfg[:boilerplates]
+else
+  @boilerplates = {}
+end
+
+# Create default file paths if none were provided
+@path_src = HERE + "../src/"  if @path_src.nil?
+@path_inc = @path_src         if @path_inc.nil?
+@path_tst = HERE + "../test/" if @path_tst.nil?
+@path_src += '/'              unless (@path_src[-1] == 47)
+@path_inc += '/'              unless (@path_inc[-1] == 47)
+@path_tst += '/'              unless (@path_tst[-1] == 47)
+@pattern  = 'src'             if @pattern.nil?
+@includes = { :src => [], :inc => [], :tst => [] }
+@includes.merge!(@extra_inc) unless @extra_inc.nil?
+
+#create triad definition
+TRIAD = [ { :ext => '.c', :path => @path_src,        :template => TEMPLATE_SRC, :inc => :src, :boilerplate => @boilerplates[:src] }, 
+          { :ext => '.h', :path => @path_inc,        :template => TEMPLATE_INC, :inc => :inc, :boilerplate => @boilerplates[:inc] },
+          { :ext => '.c', :path => @path_tst+'Test', :template => TEMPLATE_TST, :inc => :tst, :boilerplate => @boilerplates[:tst] },
+        ]
+
+#prepare the pattern for use
+@patterns = PATTERNS[@pattern.downcase]
+raise "ERROR: The design pattern specified isn't one that I recognize!" if @patterns.nil?
+
+# Assemble the path/names of the files we need to work with.
+files = []
+TRIAD.each do |triad|
+  @patterns.each_pair do |pattern_file, pattern_traits|
+    files << {
+      :path => "#{triad[:path]}#{@module_name}#{pattern_file}#{triad[:ext]}",
+      :name => "#{@module_name}#{pattern_file}",
+      :template => triad[:template],
+      :boilerplate => triad[:boilerplate],
+      :includes => case(triad[:inc])
+                     when :src then @includes[:src] | pattern_traits[:inc].map{|f| f % [@module_name]}
+                     when :inc then @includes[:inc]
+                     when :tst then @includes[:tst] | pattern_traits[:inc].map{|f| "Mock#{f}"% [@module_name]}
+                   end
+    }
+  end
+end
+
+# destroy files if that was what was requested
+if @destroy
+  files.each do |filespec|
+    file = filespec[:path]
+    if File.exist?(file)
+      if @update_svn
+        `svn delete \"#{file}\" --force` 
+        puts "File #{file} deleted and removed from source control"
+      else
+        FileUtils.remove(file)
+        puts "File #{file} deleted"
+      end
+    else
+      puts "File #{file} does not exist so cannot be removed."
+    end
+  end
+  puts "Destroy Complete"
+  exit
+end
+
+#Abort if any module already exists
+files.each do |file|
+  raise "ERROR: File #{file[:name]} already exists. Exiting." if File.exist?(file[:path])
+end
+
+# Create Source Modules
+files.each_with_index do |file, i|
+  File.open(file[:path], 'w') do |f|
+    f.write(file[:boilerplate] % [file[:name]]) unless file[:boilerplate].nil?
+    f.write(file[:template] % [ file[:name], 
+                                file[:includes].map{|f| "#include \"#{f}\"\n"}.join, 
+                                file[:name].upcase ]
+           )
+  end
+  if (@update_svn)
+    `svn add \"#{file[:path]}\"` 
+    if $?.exitstatus == 0
+      puts "File #{file[:path]} created and added to source control"
+    else
+      puts "File #{file[:path]} created but FAILED adding to source control!"
+    end
+  else
+    puts "File #{file[:path]} created"
+  end
+end
+
+puts 'Generate Complete'

Added: incubator/celix/trunk/cmake/unity/generate_test_runner.rb
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/unity/generate_test_runner.rb?rev=1528380&view=auto
==============================================================================
--- incubator/celix/trunk/cmake/unity/generate_test_runner.rb (added)
+++ incubator/celix/trunk/cmake/unity/generate_test_runner.rb Wed Oct  2 09:01:20 2013
@@ -0,0 +1,308 @@
+# ==========================================
+#   Unity Project - A Test Framework for C
+#   Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
+#   [Released under MIT License. Please refer to license.txt for details]
+# ========================================== 
+
+File.expand_path(File.join(File.dirname(__FILE__),'colour_prompt'))
+
+class UnityTestRunnerGenerator
+
+  def initialize(options = nil)
+    @options = { :includes => [], :plugins => [], :framework => :unity }
+    case(options)
+      when NilClass then @options
+      when String   then @options.merge!(UnityTestRunnerGenerator.grab_config(options))
+      when Hash     then @options.merge!(options)
+      else          raise "If you specify arguments, it should be a filename or a hash of options"
+    end
+  end
+  
+  def self.grab_config(config_file)
+    options = { :includes => [], :plugins => [], :framework => :unity }
+    unless (config_file.nil? or config_file.empty?)
+      require 'yaml'
+      yaml_guts = YAML.load_file(config_file)
+      options.merge!(yaml_guts[:unity] ? yaml_guts[:unity] : yaml_guts[:cmock])
+      raise "No :unity or :cmock section found in #{config_file}" unless options
+    end
+    return(options)
+  end
+
+  def run(input_file, output_file, options=nil)
+    tests = []
+    testfile_includes = []
+    used_mocks = []
+    
+    @options.merge!(options) unless options.nil?
+    module_name = File.basename(input_file)
+    
+    #pull required data from source file
+    File.open(input_file, 'r') do |input|
+      tests               = find_tests(input)
+      testfile_includes   = find_includes(input)
+      used_mocks          = find_mocks(testfile_includes)
+    end
+
+    #build runner file
+    generate(input_file, output_file, tests, used_mocks)
+    
+    #determine which files were used to return them
+    all_files_used = [input_file, output_file]
+    all_files_used += testfile_includes.map {|filename| filename + '.c'} unless testfile_includes.empty?
+    all_files_used += @options[:includes] unless @options[:includes].empty?
+    return all_files_used.uniq
+  end
+  
+  def generate(input_file, output_file, tests, used_mocks)
+    File.open(output_file, 'w') do |output|
+      create_header(output, used_mocks)
+      create_externs(output, tests, used_mocks)
+      create_mock_management(output, used_mocks)
+      create_suite_setup_and_teardown(output)
+      create_reset(output, used_mocks)
+      create_main(output, input_file, tests)
+    end
+  end
+  
+  def find_tests(input_file)
+    tests_raw = []
+    tests_args = []
+    tests_and_line_numbers = []
+    
+    input_file.rewind
+    source_raw = input_file.read
+    source_scrubbed = source_raw.gsub(/\/\/.*$/, '')           # remove line comments
+    source_scrubbed = source_scrubbed.gsub(/\/\*.*?\*\//m, '') # remove block comments
+    lines = source_scrubbed.split(/(^\s*\#.*$)                 # Treat preprocessor directives as a logical line
+                              | (;|\{|\}) /x)                  # Match ;, {, and } as end of lines
+
+    lines.each_with_index do |line, index|
+      #find tests
+      if line =~ /^((?:\s*TEST_CASE\s*\(.*?\)\s*)*)\s*void\s+(test.*?)\s*\(\s*(.*)\s*\)/
+        arguments = $1
+        name = $2
+        call = $3
+        args = nil
+        if (@options[:use_param_tests] and !arguments.empty?)
+          args = []
+          arguments.scan(/\s*TEST_CASE\s*\((.*)\)\s*$/) {|a| args << a[0]}
+        end
+        tests_and_line_numbers << { :test => name, :args => args, :call => call, :line_number => 0 }
+        tests_args = []
+      end
+    end
+
+    #determine line numbers and create tests to run
+    source_lines = source_raw.split("\n")
+    source_index = 0;
+    tests_and_line_numbers.size.times do |i|
+      source_lines[source_index..-1].each_with_index do |line, index|
+        if (line =~ /#{tests_and_line_numbers[i][:test]}/)
+          source_index += index
+          tests_and_line_numbers[i][:line_number] = source_index + 1
+          break
+        end
+      end
+    end
+    
+    return tests_and_line_numbers
+  end
+
+  def find_includes(input_file)
+    input_file.rewind
+    includes = []
+    input_file.readlines.each do |line|
+      scan_results = line.scan(/^\s*#include\s+\"\s*(.+)\.[hH]\s*\"/)
+      includes << scan_results[0][0] if (scan_results.size > 0)
+    end
+    return includes
+  end
+  
+  def find_mocks(includes)
+    mock_headers = []
+    includes.each do |include_file|
+      mock_headers << File.basename(include_file) if (include_file =~ /^mock/i)
+    end
+    return mock_headers  
+  end
+  
+  def create_header(output, mocks)
+    output.puts('/* AUTOGENERATED FILE. DO NOT EDIT. */')
+    create_runtest(output, mocks)
+    output.puts("\n//=======Automagically Detected Files To Include=====")
+    output.puts("#include \"#{@options[:framework].to_s}.h\"")
+    output.puts('#include "cmock.h"') unless (mocks.empty?)
+    @options[:includes].flatten.uniq.compact.each do |inc|
+      output.puts("#include #{inc.include?('<') ? inc : "\"#{inc.gsub('.h','')}.h\""}")
+    end
+    output.puts('#include <setjmp.h>')
+    output.puts('#include <stdio.h>')
+    output.puts('#include "CException.h"') if @options[:plugins].include?(:cexception)
+    mocks.each do |mock|
+      output.puts("#include \"#{mock.gsub('.h','')}.h\"")
+    end
+    if @options[:enforce_strict_ordering]
+      output.puts('')    
+      output.puts('int GlobalExpectCount;') 
+      output.puts('int GlobalVerifyOrder;') 
+      output.puts('char* GlobalOrderError;') 
+    end
+  end
+  
+  def create_externs(output, tests, mocks)
+    output.puts("\n//=======External Functions This Runner Calls=====")
+    output.puts("extern void setUp(void);")
+    output.puts("extern void tearDown(void);")
+    tests.each do |test|
+      output.puts("extern void #{test[:test]}(#{test[:call] || 'void'});")
+    end
+    output.puts('')
+  end
+  
+  def create_mock_management(output, mocks)
+    unless (mocks.empty?)
+      output.puts("\n//=======Mock Management=====")
+      output.puts("static void CMock_Init(void)")
+      output.puts("{")
+      if @options[:enforce_strict_ordering]
+        output.puts("  GlobalExpectCount = 0;")
+        output.puts("  GlobalVerifyOrder = 0;") 
+        output.puts("  GlobalOrderError = NULL;") 
+      end
+      mocks.each do |mock|
+        output.puts("  #{mock}_Init();")
+      end
+      output.puts("}\n")
+
+      output.puts("static void CMock_Verify(void)")
+      output.puts("{")
+      mocks.each do |mock|
+        output.puts("  #{mock}_Verify();")
+      end
+      output.puts("}\n")
+
+      output.puts("static void CMock_Destroy(void)")
+      output.puts("{")
+      mocks.each do |mock|
+        output.puts("  #{mock}_Destroy();")
+      end
+      output.puts("}\n")
+    end
+  end
+  
+  def create_suite_setup_and_teardown(output)
+    unless (@options[:suite_setup].nil?)
+      output.puts("\n//=======Suite Setup=====")
+      output.puts("static int suite_setup(void)")
+      output.puts("{")
+      output.puts(@options[:suite_setup])
+      output.puts("}")
+    end
+    unless (@options[:suite_teardown].nil?)
+      output.puts("\n//=======Suite Teardown=====")
+      output.puts("static int suite_teardown(int num_failures)")
+      output.puts("{")
+      output.puts(@options[:suite_teardown])
+      output.puts("}")
+    end
+  end
+  
+  def create_runtest(output, used_mocks)
+    cexception = @options[:plugins].include? :cexception
+    va_args1   = @options[:use_param_tests] ? ', ...' : ''
+    va_args2   = @options[:use_param_tests] ? '__VA_ARGS__' : ''
+    output.puts("\n//=======Test Runner Used To Run Each Test Below=====")
+    output.puts("#define RUN_TEST_NO_ARGS") if @options[:use_param_tests] 
+    output.puts("#define RUN_TEST(TestFunc, TestLineNum#{va_args1}) \\")
+    output.puts("{ \\")
+    output.puts("  Unity.CurrentTestName = #TestFunc#{va_args2.empty? ? '' : " \"(\" ##{va_args2} \")\""}; \\")
+    output.puts("  Unity.CurrentTestLineNumber = TestLineNum; \\")
+    output.puts("  Unity.NumberOfTests++; \\")
+    output.puts("  if (TEST_PROTECT()) \\")
+    output.puts("  { \\")
+    output.puts("    CEXCEPTION_T e; \\") if cexception
+    output.puts("    Try { \\") if cexception
+    output.puts("      CMock_Init(); \\") unless (used_mocks.empty?) 
+    output.puts("      setUp(); \\")
+    output.puts("      TestFunc(#{va_args2}); \\")
+    output.puts("      CMock_Verify(); \\") unless (used_mocks.empty?)
+    output.puts("    } Catch(e) { TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, \"Unhandled Exception!\"); } \\") if cexception
+    output.puts("  } \\")
+    output.puts("  CMock_Destroy(); \\") unless (used_mocks.empty?)
+    output.puts("  if (TEST_PROTECT() && !TEST_IS_IGNORED) \\")
+    output.puts("  { \\")
+    output.puts("    tearDown(); \\")
+    output.puts("  } \\")
+    output.puts("  UnityConcludeTest(); \\")
+    output.puts("}\n")
+  end
+  
+  def create_reset(output, used_mocks)
+    output.puts("\n//=======Test Reset Option=====")
+    output.puts("void resetTest()")
+    output.puts("{")
+    output.puts("  CMock_Verify();") unless (used_mocks.empty?)
+    output.puts("  CMock_Destroy();") unless (used_mocks.empty?)
+    output.puts("  tearDown();")
+    output.puts("  CMock_Init();") unless (used_mocks.empty?) 
+    output.puts("  setUp();")
+    output.puts("}")
+  end
+  
+  def create_main(output, filename, tests)
+    output.puts("\n\n//=======MAIN=====")
+    output.puts("int main(void)")
+    output.puts("{")
+    output.puts("  suite_setup();") unless @options[:suite_setup].nil?
+    output.puts("  Unity.TestFile = \"#{filename}\";")
+    output.puts("  UnityBegin();")
+    if (@options[:use_param_tests])
+      tests.each do |test|
+        if ((test[:args].nil?) or (test[:args].empty?))
+          output.puts("  RUN_TEST(#{test[:test]}, #{test[:line_number]}, RUN_TEST_NO_ARGS);")
+        else
+          test[:args].each {|args| output.puts("  RUN_TEST(#{test[:test]}, #{test[:line_number]}, #{args});")}
+        end
+      end
+    else
+        tests.each { |test| output.puts("  RUN_TEST(#{test[:test]}, #{test[:line_number]});") }
+    end
+    output.puts()
+    output.puts("  return #{@options[:suite_teardown].nil? ? "" : "suite_teardown"}(UnityEnd());")
+    output.puts("}")
+  end
+end
+
+
+if ($0 == __FILE__)
+  options = { :includes => [] }
+  yaml_file = nil
+  
+  #parse out all the options first
+  ARGV.reject! do |arg| 
+    case(arg)
+      when '-cexception' 
+        options[:plugins] = [:cexception]; true
+      when /\.*\.yml/
+        options = UnityTestRunnerGenerator.grab_config(arg); true
+      else false
+    end
+  end     
+           
+  #make sure there is at least one parameter left (the input file)
+  if !ARGV[0]
+    puts ["usage: ruby #{__FILE__} (yaml) (options) input_test_file output_test_runner (includes)",
+           "  blah.yml    - will use config options in the yml file (see docs)",
+           "  -cexception - include cexception support"].join("\n")
+    exit 1
+  end
+  
+  #create the default test runner name if not specified
+  ARGV[1] = ARGV[0].gsub(".c","_Runner.c") if (!ARGV[1])
+  
+  #everything else is an include file
+  options[:includes] ||= (ARGV.slice(2..-1).flatten.compact) if (ARGV.size > 2)
+  
+  UnityTestRunnerGenerator.new(options).run(ARGV[0], ARGV[1])
+end

Added: incubator/celix/trunk/cmake/unity/src/unity.c
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/unity/src/unity.c?rev=1528380&view=auto
==============================================================================
--- incubator/celix/trunk/cmake/unity/src/unity.c (added)
+++ incubator/celix/trunk/cmake/unity/src/unity.c Wed Oct  2 09:01:20 2013
@@ -0,0 +1,960 @@
+/* ==========================================
+    Unity Project - A Test Framework for C
+    Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
+    [Released under MIT License. Please refer to license.txt for details]
+========================================== */
+
+#include "unity.h"
+#include <stdio.h>
+#include <string.h>
+
+#define UNITY_FAIL_AND_BAIL   { Unity.CurrentTestFailed  = 1; UNITY_OUTPUT_CHAR('\n'); longjmp(Unity.AbortFrame, 1); }
+#define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; UNITY_OUTPUT_CHAR('\n'); longjmp(Unity.AbortFrame, 1); }
+/// return prematurely if we are already in failure or ignore state
+#define UNITY_SKIP_EXECUTION  { if ((Unity.CurrentTestFailed != 0) || (Unity.CurrentTestIgnored != 0)) {return;} }
+#define UNITY_PRINT_EOL       { UNITY_OUTPUT_CHAR('\n'); }
+
+struct _Unity Unity = { 0 };
+
+const char* UnityStrNull     = "NULL";
+const char* UnityStrSpacer   = ". ";
+const char* UnityStrExpected = " Expected ";
+const char* UnityStrWas      = " Was ";
+const char* UnityStrTo       = " To ";
+const char* UnityStrElement  = " Element ";
+const char* UnityStrByte     = " Byte ";
+const char* UnityStrMemory   = " Memory Mismatch.";
+const char* UnityStrDelta    = " Values Not Within Delta ";
+const char* UnityStrPointless= " You Asked Me To Compare Nothing, Which Was Pointless.";
+const char* UnityStrNullPointerForExpected= " Expected pointer to be NULL";
+const char* UnityStrNullPointerForActual  = " Actual pointer was NULL";
+
+// compiler-generic print formatting masks
+const _U_UINT UnitySizeMask[] = 
+{
+    255u,         // 0xFF
+    65535u,       // 0xFFFF
+    65535u,
+    4294967295u,  // 0xFFFFFFFF
+    4294967295u,
+    4294967295u,
+    4294967295u
+#ifdef UNITY_SUPPORT_64
+    ,0xFFFFFFFFFFFFFFFF
+#endif
+};
+
+//-----------------------------------------------
+// Pretty Printers & Test Result Output Handlers
+//-----------------------------------------------
+
+void UnityPrint(const char* string)
+{
+    const char* pch = string;
+
+    if (pch != NULL)
+    {
+        while (*pch)
+        {
+            // printable characters plus CR & LF are printed
+            if ((*pch <= 126) && (*pch >= 32))
+            {
+                UNITY_OUTPUT_CHAR(*pch);
+            }
+            //write escaped carriage returns
+            else if (*pch == 13)
+            {
+                UNITY_OUTPUT_CHAR('\\');
+                UNITY_OUTPUT_CHAR('r');
+            }
+            //write escaped line feeds
+            else if (*pch == 10)
+            {
+                UNITY_OUTPUT_CHAR('\\');
+                UNITY_OUTPUT_CHAR('n');
+            }
+            // unprintable characters are shown as codes
+            else
+            {
+                UNITY_OUTPUT_CHAR('\\');
+                UnityPrintNumberHex((_U_SINT)*pch, 2);
+            }
+            pch++;
+        }
+    }
+}
+
+//-----------------------------------------------
+void UnityPrintNumberByStyle(const _U_SINT number, const UNITY_DISPLAY_STYLE_T style)
+{
+    if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
+    {
+        UnityPrintNumber(number);
+    }
+    else if ((style & UNITY_DISPLAY_RANGE_UINT) == UNITY_DISPLAY_RANGE_UINT)
+    {
+        UnityPrintNumberUnsigned(  (_U_UINT)number  &  UnitySizeMask[((_U_UINT)style & (_U_UINT)0x0F) - 1]  );
+    }
+    else
+    {
+        UnityPrintNumberHex((_U_UINT)number, (style & 0x000F) << 1);
+    }
+}
+
+//-----------------------------------------------
+/// basically do an itoa using as little ram as possible
+void UnityPrintNumber(const _U_SINT number_to_print)
+{
+    _U_SINT divisor = 1;
+    _U_SINT next_divisor;
+    _U_SINT number = number_to_print;
+
+    if (number < 0)
+    {
+        UNITY_OUTPUT_CHAR('-');
+        number = -number;
+    }
+
+    // figure out initial divisor
+    while (number / divisor > 9)
+    {
+        next_divisor = divisor * 10;
+        if (next_divisor > divisor)
+            divisor = next_divisor;
+        else
+            break;
+    }
+
+    // now mod and print, then divide divisor
+    do
+    {
+        UNITY_OUTPUT_CHAR((char)('0' + (number / divisor % 10)));
+        divisor /= 10;
+    }
+    while (divisor > 0);
+}
+
+//-----------------------------------------------
+/// basically do an itoa using as little ram as possible
+void UnityPrintNumberUnsigned(const _U_UINT number)
+{
+    _U_UINT divisor = 1;
+    _U_UINT next_divisor;
+
+    // figure out initial divisor
+    while (number / divisor > 9)
+    {
+        next_divisor = divisor * 10;
+        if (next_divisor > divisor)
+            divisor = next_divisor;
+        else
+            break;
+    }
+
+    // now mod and print, then divide divisor
+    do
+    {
+        UNITY_OUTPUT_CHAR((char)('0' + (number / divisor % 10)));
+        divisor /= 10;
+    }
+    while (divisor > 0);
+}
+
+//-----------------------------------------------
+void UnityPrintNumberHex(const _U_UINT number, const char nibbles_to_print)
+{
+    _U_UINT nibble;
+    char nibbles = nibbles_to_print;
+    UNITY_OUTPUT_CHAR('0');
+    UNITY_OUTPUT_CHAR('x');
+
+    while (nibbles > 0)
+    {
+        nibble = (number >> (--nibbles << 2)) & 0x0000000F;
+        if (nibble <= 9)
+        {
+            UNITY_OUTPUT_CHAR((char)('0' + nibble));
+        }
+        else
+        {
+            UNITY_OUTPUT_CHAR((char)('A' - 10 + nibble));
+        }
+    }
+}
+
+//-----------------------------------------------
+void UnityPrintMask(const _U_UINT mask, const _U_UINT number)
+{
+    _U_UINT current_bit = (_U_UINT)1 << (UNITY_INT_WIDTH - 1);
+    _US32 i;
+
+    for (i = 0; i < UNITY_INT_WIDTH; i++)
+    {
+        if (current_bit & mask)
+        {
+            if (current_bit & number)
+            {
+                UNITY_OUTPUT_CHAR('1');
+            }
+            else
+            {
+                UNITY_OUTPUT_CHAR('0');
+            }
+        }
+        else
+        {
+            UNITY_OUTPUT_CHAR('X');
+        }
+        current_bit = current_bit >> 1;
+    }
+}
+
+//-----------------------------------------------
+#ifdef UNITY_FLOAT_VERBOSE
+void UnityPrintFloat(_UF number)
+{
+    char TempBuffer[32];
+    sprintf(TempBuffer, "%.6f", number);
+    UnityPrint(TempBuffer);
+}
+#endif
+
+//-----------------------------------------------
+void UnityTestResultsBegin(const char* file, const UNITY_LINE_TYPE line)
+{
+    UnityPrint(file);
+    UNITY_OUTPUT_CHAR(':');
+    UnityPrintNumber(line);
+    UNITY_OUTPUT_CHAR(':');
+    UnityPrint(Unity.CurrentTestName);
+    UNITY_OUTPUT_CHAR(':');
+}
+
+//-----------------------------------------------
+void UnityTestResultsFailBegin(const UNITY_LINE_TYPE line)
+{
+    UnityTestResultsBegin(Unity.TestFile, line);
+    UnityPrint("FAIL:");
+}
+
+//-----------------------------------------------
+void UnityConcludeTest(void)
+{
+    if (Unity.CurrentTestIgnored)
+    {
+        Unity.TestIgnores++;
+    }
+    else if (!Unity.CurrentTestFailed)
+    {
+        UnityTestResultsBegin(Unity.TestFile, Unity.CurrentTestLineNumber);
+        UnityPrint("PASS");
+        UNITY_PRINT_EOL;
+    }
+    else
+    {
+        Unity.TestFailures++;
+    }
+
+    Unity.CurrentTestFailed = 0;
+    Unity.CurrentTestIgnored = 0;
+}
+
+//-----------------------------------------------
+void UnityAddMsgIfSpecified(const char* msg)
+{
+    if (msg)
+    {
+        UnityPrint(UnityStrSpacer);
+        UnityPrint(msg);
+    }
+}
+
+//-----------------------------------------------
+void UnityPrintExpectedAndActualStrings(const char* expected, const char* actual)
+{
+    UnityPrint(UnityStrExpected);
+    if (expected != NULL)
+    {
+        UNITY_OUTPUT_CHAR('\'');
+        UnityPrint(expected);
+        UNITY_OUTPUT_CHAR('\'');
+    }
+    else
+    {
+      UnityPrint(UnityStrNull);          
+    }
+    UnityPrint(UnityStrWas);
+    if (actual != NULL)
+    {
+        UNITY_OUTPUT_CHAR('\'');
+        UnityPrint(actual);
+        UNITY_OUTPUT_CHAR('\'');
+    }
+    else
+    {
+      UnityPrint(UnityStrNull);          
+    }
+}
+
+//-----------------------------------------------
+// Assertion & Control Helpers
+//-----------------------------------------------
+
+int UnityCheckArraysForNull(const void* expected, const void* actual, const UNITY_LINE_TYPE lineNumber, const char* msg)
+{
+    //return true if they are both NULL
+    if ((expected == NULL) && (actual == NULL))
+        return 1;
+        
+    //throw error if just expected is NULL
+    if (expected == NULL)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrNullPointerForExpected);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+
+    //throw error if just actual is NULL
+    if (actual == NULL)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrNullPointerForActual);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+    
+    //return false if neither is NULL
+    return 0;
+}
+
+//-----------------------------------------------
+// Assertion Functions
+//-----------------------------------------------
+
+void UnityAssertBits(const _U_SINT mask,
+                     const _U_SINT expected,
+                     const _U_SINT actual,
+                     const char* msg,
+                     const UNITY_LINE_TYPE lineNumber)
+{
+    UNITY_SKIP_EXECUTION;
+  
+    if ((mask & expected) != (mask & actual))
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrExpected);
+        UnityPrintMask(mask, expected);
+        UnityPrint(UnityStrWas);
+        UnityPrintMask(mask, actual);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+}
+
+//-----------------------------------------------
+void UnityAssertEqualNumber(const _U_SINT expected,
+                            const _U_SINT actual,
+                            const char* msg,
+                            const UNITY_LINE_TYPE lineNumber,
+                            const UNITY_DISPLAY_STYLE_T style)
+{
+    UNITY_SKIP_EXECUTION;
+
+    if (expected != actual)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrExpected);
+        UnityPrintNumberByStyle(expected, style);
+        UnityPrint(UnityStrWas);
+        UnityPrintNumberByStyle(actual, style);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+}
+
+//-----------------------------------------------
+void UnityAssertEqualIntArray(const _U_SINT* expected,
+                              const _U_SINT* actual,
+                              const _UU32 num_elements,
+                              const char* msg,
+                              const UNITY_LINE_TYPE lineNumber,
+                              const UNITY_DISPLAY_STYLE_T style)
+{
+    _UU32 elements = num_elements;
+    const _US8* ptr_exp = (_US8*)expected;
+    const _US8* ptr_act = (_US8*)actual;
+
+    UNITY_SKIP_EXECUTION;
+  
+    if (elements == 0)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrPointless);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+    
+    if (UnityCheckArraysForNull((void*)expected, (void*)actual, lineNumber, msg) == 1)
+        return;
+
+    switch(style)
+    {
+        case UNITY_DISPLAY_STYLE_HEX8:
+        case UNITY_DISPLAY_STYLE_INT8:
+        case UNITY_DISPLAY_STYLE_UINT8:
+            while (elements--)
+            {
+                if (*ptr_exp != *ptr_act)
+                {
+                    UnityTestResultsFailBegin(lineNumber);
+                    UnityPrint(UnityStrElement);
+                    UnityPrintNumberByStyle((num_elements - elements - 1), UNITY_DISPLAY_STYLE_UINT);
+                    UnityPrint(UnityStrExpected);
+                    UnityPrintNumberByStyle(*ptr_exp, style);
+                    UnityPrint(UnityStrWas);
+                    UnityPrintNumberByStyle(*ptr_act, style);
+                    UnityAddMsgIfSpecified(msg);
+                    UNITY_FAIL_AND_BAIL;
+                }
+                ptr_exp += 1;
+                ptr_act += 1;
+            }
+            break;
+        case UNITY_DISPLAY_STYLE_HEX16:
+        case UNITY_DISPLAY_STYLE_INT16:
+        case UNITY_DISPLAY_STYLE_UINT16:
+            while (elements--)
+            {
+                if (*(_US16*)ptr_exp != *(_US16*)ptr_act)
+                {
+                    UnityTestResultsFailBegin(lineNumber);
+                    UnityPrint(UnityStrElement);
+                    UnityPrintNumberByStyle((num_elements - elements - 1), UNITY_DISPLAY_STYLE_UINT);
+                    UnityPrint(UnityStrExpected);
+                    UnityPrintNumberByStyle(*(_US16*)ptr_exp, style);
+                    UnityPrint(UnityStrWas);
+                    UnityPrintNumberByStyle(*(_US16*)ptr_act, style);
+                    UnityAddMsgIfSpecified(msg);
+                    UNITY_FAIL_AND_BAIL;
+                }
+                ptr_exp += 2;
+                ptr_act += 2;
+            }
+            break;
+#ifdef UNITY_SUPPORT_64
+        case UNITY_DISPLAY_STYLE_HEX64:
+        case UNITY_DISPLAY_STYLE_INT64:
+        case UNITY_DISPLAY_STYLE_UINT64:
+            while (elements--)
+            {
+                if (*(_US64*)ptr_exp != *(_US64*)ptr_act)
+                {
+                    UnityTestResultsFailBegin(lineNumber);
+                    UnityPrint(UnityStrElement);
+                    UnityPrintNumberByStyle((num_elements - elements - 1), UNITY_DISPLAY_STYLE_UINT);
+                    UnityPrint(UnityStrExpected);
+                    UnityPrintNumberByStyle(*(_US64*)ptr_exp, style);
+                    UnityPrint(UnityStrWas);
+                    UnityPrintNumberByStyle(*(_US64*)ptr_act, style);
+                    UnityAddMsgIfSpecified(msg);
+                    UNITY_FAIL_AND_BAIL;
+                }
+                ptr_exp += 8;
+                ptr_act += 8;
+            }
+            break;
+#endif
+        default:
+            while (elements--)
+            {
+                if (*(_US32*)ptr_exp != *(_US32*)ptr_act)
+                {
+                    UnityTestResultsFailBegin(lineNumber);
+                    UnityPrint(UnityStrElement);
+                    UnityPrintNumberByStyle((num_elements - elements - 1), UNITY_DISPLAY_STYLE_UINT);
+                    UnityPrint(UnityStrExpected);
+                    UnityPrintNumberByStyle(*(_US32*)ptr_exp, style);
+                    UnityPrint(UnityStrWas);
+                    UnityPrintNumberByStyle(*(_US32*)ptr_act, style);
+                    UnityAddMsgIfSpecified(msg);
+                    UNITY_FAIL_AND_BAIL;
+                }
+                ptr_exp += 4;
+                ptr_act += 4;
+            }
+            break;
+    }
+}
+
+//-----------------------------------------------
+#ifndef UNITY_EXCLUDE_FLOAT
+void UnityAssertEqualFloatArray(const _UF* expected,
+                                const _UF* actual,
+                                const _UU32 num_elements,
+                                const char* msg,
+                                const UNITY_LINE_TYPE lineNumber)
+{
+    _UU32 elements = num_elements;
+    const _UF* ptr_expected = expected;
+    const _UF* ptr_actual = actual;
+    _UF diff, tol;
+
+    UNITY_SKIP_EXECUTION;
+  
+    if (elements == 0)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrPointless);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+    
+    if (UnityCheckArraysForNull((void*)expected, (void*)actual, lineNumber, msg) == 1)
+        return;
+
+    while (elements--)
+    {
+        diff = *ptr_expected - *ptr_actual;
+        if (diff < 0.0)
+          diff = 0.0 - diff;
+        tol = UNITY_FLOAT_PRECISION * *ptr_expected;
+        if (tol < 0.0)
+            tol = 0.0 - tol;
+        if (diff > tol)
+        {
+            UnityTestResultsFailBegin(lineNumber);
+            UnityPrint(UnityStrElement);
+            UnityPrintNumberByStyle((num_elements - elements - 1), UNITY_DISPLAY_STYLE_UINT);
+#ifdef UNITY_FLOAT_VERBOSE
+            UnityPrint(UnityStrExpected);
+            UnityPrintFloat(*ptr_expected);
+            UnityPrint(UnityStrWas);
+            UnityPrintFloat(*ptr_actual);
+#else
+            UnityPrint(UnityStrDelta);
+#endif
+            UnityAddMsgIfSpecified(msg);
+            UNITY_FAIL_AND_BAIL;
+        }
+        ptr_expected++;
+        ptr_actual++;
+    }
+}
+
+//-----------------------------------------------
+void UnityAssertFloatsWithin(const _UF delta,
+                             const _UF expected,
+                             const _UF actual,
+                             const char* msg,
+                             const UNITY_LINE_TYPE lineNumber)
+{
+    _UF diff = actual - expected;
+    _UF pos_delta = delta;
+
+    UNITY_SKIP_EXECUTION;
+  
+    if (diff < 0)
+    {
+        diff = 0.0f - diff;
+    }
+    if (pos_delta < 0)
+    {
+        pos_delta = 0.0f - pos_delta;
+    }
+
+    if (pos_delta < diff)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+#ifdef UNITY_FLOAT_VERBOSE
+        UnityPrint(UnityStrExpected);
+        UnityPrintFloat(expected);
+        UnityPrint(UnityStrWas);
+        UnityPrintFloat(actual);
+#else
+        UnityPrint(UnityStrDelta);
+#endif
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+}
+
+#endif //not UNITY_EXCLUDE_FLOAT
+
+//-----------------------------------------------
+#ifndef UNITY_EXCLUDE_DOUBLE
+void UnityAssertEqualDoubleArray(const _UD* expected,
+                                 const _UD* actual,
+                                 const _UU32 num_elements,
+                                 const char* msg,
+                                 const UNITY_LINE_TYPE lineNumber)
+{
+    _UU32 elements = num_elements;
+    const _UD* ptr_expected = expected;
+    const _UD* ptr_actual = actual;
+    _UD diff, tol;
+
+    UNITY_SKIP_EXECUTION;
+  
+    if (elements == 0)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrPointless);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+    
+    if (UnityCheckArraysForNull((void*)expected, (void*)actual, lineNumber, msg) == 1)
+        return;
+
+    while (elements--)
+    {
+        diff = *ptr_expected - *ptr_actual;
+        if (diff < 0.0)
+          diff = 0.0 - diff;
+        tol = UNITY_DOUBLE_PRECISION * *ptr_expected;
+        if (tol < 0.0)
+            tol = 0.0 - tol;
+        if (diff > tol)
+        {
+            UnityTestResultsFailBegin(lineNumber);
+            UnityPrint(UnityStrElement);
+            UnityPrintNumberByStyle((num_elements - elements - 1), UNITY_DISPLAY_STYLE_UINT);
+#ifdef UNITY_DOUBLE_VERBOSE
+            UnityPrint(UnityStrExpected);
+            UnityPrintFloat((float)(*ptr_expected));
+            UnityPrint(UnityStrWas);
+            UnityPrintFloat((float)(*ptr_actual));
+#else
+            UnityPrint(UnityStrDelta);
+#endif
+            UnityAddMsgIfSpecified(msg);
+            UNITY_FAIL_AND_BAIL;
+        }
+        ptr_expected++;
+        ptr_actual++;
+    }
+}
+
+//-----------------------------------------------
+void UnityAssertDoublesWithin(const _UD delta,
+                              const _UD expected,
+                              const _UD actual,
+                              const char* msg,
+                              const UNITY_LINE_TYPE lineNumber)
+{
+    _UD diff = actual - expected;
+    _UD pos_delta = delta;
+
+    UNITY_SKIP_EXECUTION;
+  
+    if (diff < 0)
+    {
+        diff = 0.0f - diff;
+    }
+    if (pos_delta < 0)
+    {
+        pos_delta = 0.0f - pos_delta;
+    }
+
+    if (pos_delta < diff)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+#ifdef UNITY_DOUBLE_VERBOSE
+        UnityPrint(UnityStrExpected);
+        UnityPrintFloat((float)expected);
+        UnityPrint(UnityStrWas);
+        UnityPrintFloat((float)actual);
+#else
+        UnityPrint(UnityStrDelta);
+#endif
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+}
+
+#endif // not UNITY_EXCLUDE_DOUBLE
+
+//-----------------------------------------------
+void UnityAssertNumbersWithin( const _U_SINT delta,
+                               const _U_SINT expected,
+                               const _U_SINT actual,
+                               const char* msg,
+                               const UNITY_LINE_TYPE lineNumber,
+                               const UNITY_DISPLAY_STYLE_T style)
+{
+    UNITY_SKIP_EXECUTION;
+    
+    if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT)
+    {
+        if (actual > expected)
+          Unity.CurrentTestFailed = ((actual - expected) > delta);
+        else
+          Unity.CurrentTestFailed = ((expected - actual) > delta);
+    }
+    else
+    {
+        if ((_U_UINT)actual > (_U_UINT)expected)
+            Unity.CurrentTestFailed = ((_U_UINT)(actual - expected) > (_U_UINT)delta);
+        else
+            Unity.CurrentTestFailed = ((_U_UINT)(expected - actual) > (_U_UINT)delta);
+    }
+
+    if (Unity.CurrentTestFailed)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrDelta);
+        UnityPrintNumberByStyle(delta, style);
+        UnityPrint(UnityStrExpected);
+        UnityPrintNumberByStyle(expected, style);
+        UnityPrint(UnityStrWas);
+        UnityPrintNumberByStyle(actual, style);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+}
+
+//-----------------------------------------------
+void UnityAssertEqualString(const char* expected,
+                            const char* actual,
+                            const char* msg,
+                            const UNITY_LINE_TYPE lineNumber)
+{
+    _UU32 i;
+
+    UNITY_SKIP_EXECUTION;
+  
+    // if both pointers not null compare the strings
+    if (expected && actual)
+    {
+        for (i = 0; expected[i] || actual[i]; i++)
+        {
+            if (expected[i] != actual[i])
+            {
+                Unity.CurrentTestFailed = 1;
+                break;
+            }
+        }
+    }
+    else
+    { // handle case of one pointers being null (if both null, test should pass)
+        if (expected != actual)
+        {
+            Unity.CurrentTestFailed = 1;
+        }
+    }
+
+    if (Unity.CurrentTestFailed)
+    {
+      UnityTestResultsFailBegin(lineNumber);
+      UnityPrintExpectedAndActualStrings(expected, actual);
+      UnityAddMsgIfSpecified(msg);
+      UNITY_FAIL_AND_BAIL;
+    }
+}
+
+//-----------------------------------------------
+void UnityAssertEqualStringArray( const char** expected,
+                                  const char** actual,
+                                  const _UU32 num_elements,
+                                  const char* msg,
+                                  const UNITY_LINE_TYPE lineNumber)
+{
+    _UU32 i, j = 0;
+    
+    UNITY_SKIP_EXECUTION;
+  
+    // if no elements, it's an error
+    if (num_elements == 0)
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrPointless);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+
+    if (UnityCheckArraysForNull((void*)expected, (void*)actual, lineNumber, msg) == 1)
+        return;
+    
+    do
+    {
+        // if both pointers not null compare the strings
+        if (expected[j] && actual[j])
+        {
+            for (i = 0; expected[j][i] || actual[j][i]; i++)
+            {
+                if (expected[j][i] != actual[j][i])
+                {
+                    Unity.CurrentTestFailed = 1;
+                    break;
+                }
+            }
+        }
+        else
+        { // handle case of one pointers being null (if both null, test should pass)
+            if (expected[j] != actual[j])
+            {
+                Unity.CurrentTestFailed = 1;
+            }
+        }
+
+        if (Unity.CurrentTestFailed)
+        {
+            UnityTestResultsFailBegin(lineNumber);
+            if (num_elements > 1)
+            {
+                UnityPrint(UnityStrElement);
+                UnityPrintNumberByStyle((num_elements - j - 1), UNITY_DISPLAY_STYLE_UINT);
+            }
+            UnityPrintExpectedAndActualStrings((const char*)(expected[j]), (const char*)(actual[j]));
+            UnityAddMsgIfSpecified(msg);
+            UNITY_FAIL_AND_BAIL;
+        } 
+    } while (++j < num_elements);
+}
+
+//-----------------------------------------------
+void UnityAssertEqualMemory( const void* expected,
+                             const void* actual,
+                             _UU32 length,
+                             _UU32 num_elements,
+                             const char* msg,
+                             const UNITY_LINE_TYPE lineNumber)
+{
+    unsigned char* ptr_exp = (unsigned char*)expected;
+    unsigned char* ptr_act = (unsigned char*)actual;
+    _UU32 elements = num_elements;
+    _UU32 bytes;
+
+    UNITY_SKIP_EXECUTION;
+  
+    if ((elements == 0) || (length == 0))
+    {
+        UnityTestResultsFailBegin(lineNumber);
+        UnityPrint(UnityStrPointless);
+        UnityAddMsgIfSpecified(msg);
+        UNITY_FAIL_AND_BAIL;
+    }
+
+    if (UnityCheckArraysForNull((void*)expected, (void*)actual, lineNumber, msg) == 1)
+        return;
+        
+    while (elements--)
+    {
+        /////////////////////////////////////
+        bytes = length;
+        while (bytes--)
+        {
+            if (*ptr_exp != *ptr_act)
+            {
+                UnityTestResultsFailBegin(lineNumber);
+                UnityPrint(UnityStrMemory);
+                if (num_elements > 1)
+                {
+                    UnityPrint(UnityStrElement);
+                    UnityPrintNumberByStyle((num_elements - elements - 1), UNITY_DISPLAY_STYLE_UINT);
+                }
+                UnityPrint(UnityStrByte);
+                UnityPrintNumberByStyle((length - bytes - 1), UNITY_DISPLAY_STYLE_UINT);
+                UnityPrint(UnityStrExpected);
+                UnityPrintNumberByStyle(*ptr_exp, UNITY_DISPLAY_STYLE_HEX8);
+                UnityPrint(UnityStrWas);
+                UnityPrintNumberByStyle(*ptr_act, UNITY_DISPLAY_STYLE_HEX8);
+                UnityAddMsgIfSpecified(msg);
+                UNITY_FAIL_AND_BAIL;
+            }
+            ptr_exp += 1;
+            ptr_act += 1;
+        }
+        /////////////////////////////////////
+        
+    }
+}
+
+//-----------------------------------------------
+// Control Functions
+//-----------------------------------------------
+
+void UnityFail(const char* msg, const UNITY_LINE_TYPE line)
+{
+    UNITY_SKIP_EXECUTION;
+
+    UnityTestResultsBegin(Unity.TestFile, line);
+    UnityPrint("FAIL");
+    if (msg != NULL)
+    {
+      UNITY_OUTPUT_CHAR(':');
+      if (msg[0] != ' ')
+      {
+        UNITY_OUTPUT_CHAR(' ');  
+      }
+      UnityPrint(msg);
+    }
+    UNITY_FAIL_AND_BAIL;
+}
+
+//-----------------------------------------------
+void UnityIgnore(const char* msg, const UNITY_LINE_TYPE line)
+{
+    UNITY_SKIP_EXECUTION;
+
+    UnityTestResultsBegin(Unity.TestFile, line);
+    UnityPrint("IGNORE");
+    if (msg != NULL)
+    {
+      UNITY_OUTPUT_CHAR(':');
+      UNITY_OUTPUT_CHAR(' ');
+      UnityPrint(msg);
+    }
+    UNITY_IGNORE_AND_BAIL;
+}
+
+//-----------------------------------------------
+void setUp(void);
+void tearDown(void);
+void UnityDefaultTestRun(UnityTestFunction Func, const char* FuncName, const int FuncLineNum)
+{
+    Unity.CurrentTestName = FuncName;
+    Unity.CurrentTestLineNumber = FuncLineNum;
+    Unity.NumberOfTests++; 
+    if (TEST_PROTECT())
+    {
+        setUp();
+        Func();
+    }
+    if (TEST_PROTECT() && !(Unity.CurrentTestIgnored))
+    {
+        tearDown();
+    }
+    UnityConcludeTest();
+}
+
+//-----------------------------------------------
+void UnityBegin(void)
+{
+    Unity.NumberOfTests = 0;
+}
+
+//-----------------------------------------------
+int UnityEnd(void)
+{
+    UnityPrint("-----------------------");
+    UNITY_PRINT_EOL;
+    UnityPrintNumber(Unity.NumberOfTests);
+    UnityPrint(" Tests ");
+    UnityPrintNumber(Unity.TestFailures);
+    UnityPrint(" Failures ");
+    UnityPrintNumber(Unity.TestIgnores);
+    UnityPrint(" Ignored");
+    UNITY_PRINT_EOL;
+    if (Unity.TestFailures == 0U)
+    {
+        UnityPrint("OK");
+    }
+    else
+    {
+        UnityPrint("FAIL");
+    }
+    UNITY_PRINT_EOL;
+    return Unity.TestFailures;
+}

Added: incubator/celix/trunk/cmake/unity/src/unity.h
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/unity/src/unity.h?rev=1528380&view=auto
==============================================================================
--- incubator/celix/trunk/cmake/unity/src/unity.h (added)
+++ incubator/celix/trunk/cmake/unity/src/unity.h Wed Oct  2 09:01:20 2013
@@ -0,0 +1,232 @@
+/* ==========================================
+    Unity Project - A Test Framework for C
+    Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
+    [Released under MIT License. Please refer to license.txt for details]
+========================================== */
+
+#ifndef UNITY_FRAMEWORK_H
+#define UNITY_FRAMEWORK_H
+
+#define UNITY
+
+#include "unity_internals.h"
+
+//-------------------------------------------------------
+// Configuration Options
+//-------------------------------------------------------
+
+// Integers
+//     - Unity assumes 32 bit integers by default
+//     - If your compiler treats ints of a different size, define UNITY_INT_WIDTH
+
+// Floats
+//     - define UNITY_EXCLUDE_FLOAT to disallow floating point comparisons
+//     - define UNITY_FLOAT_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_FLOAT
+//     - define UNITY_FLOAT_TYPE to specify doubles instead of single precision floats
+//     - define UNITY_FLOAT_VERBOSE to print floating point values in errors (uses sprintf)
+//     - define UNITY_INCLUDE_DOUBLE to allow double floating point comparisons
+//     - define UNITY_EXCLUDE_DOUBLE to disallow double floating point comparisons (default)
+//     - define UNITY_DOUBLE_PRECISION to specify the precision to use when doing TEST_ASSERT_EQUAL_DOUBLE
+//     - define UNITY_DOUBLE_TYPE to specify something other than double 
+//     - define UNITY_DOUBLE_VERBOSE to print floating point values in errors (uses sprintf)
+
+// Output
+//     - by default, Unity prints to standard out with putchar.  define UNITY_OUTPUT_CHAR(a) with a different function if desired
+
+// Optimization
+//     - by default, line numbers are stored in unsigned shorts.  Define UNITY_LINE_TYPE with a different type if your files are huge
+//     - by default, test and failure counters are unsigned shorts.  Define UNITY_COUNTER_TYPE with a different type if you want to save space or have more than 65535 Tests.
+
+// Test Cases
+//     - define UNITY_SUPPORT_TEST_CASES to include the TEST_CASE macro, though really it's mostly about the runner generator script
+
+// Parameterized Tests
+//     - you'll want to create a define of TEST_CASE(...) which basically evaluates to nothing
+
+//-------------------------------------------------------
+// Test Running Macros
+//-------------------------------------------------------
+
+#define TEST_PROTECT() (setjmp(Unity.AbortFrame) == 0)
+
+#define TEST_ABORT() {longjmp(Unity.AbortFrame, 1);}
+
+#ifndef RUN_TEST
+#define RUN_TEST(func, line_num) UnityDefaultTestRun(func, #func, line_num)
+#endif
+
+#define TEST_LINE_NUM (Unity.CurrentTestLineNumber)
+#define TEST_IS_IGNORED (Unity.CurrentTestIgnored)
+
+//-------------------------------------------------------
+// Basic Fail and Ignore
+//-------------------------------------------------------
+
+#define TEST_FAIL_MESSAGE(message)                                                                 UNITY_TEST_FAIL(__LINE__, message)
+#define TEST_FAIL()                                                                                UNITY_TEST_FAIL(__LINE__, NULL)
+#define TEST_IGNORE_MESSAGE(message)                                                               UNITY_TEST_IGNORE(__LINE__, message)
+#define TEST_IGNORE()                                                                              UNITY_TEST_IGNORE(__LINE__, NULL)
+#define TEST_ONLY()
+
+//-------------------------------------------------------
+// Test Asserts (simple)
+//-------------------------------------------------------
+
+//Boolean
+#define TEST_ASSERT(condition)                                                                     UNITY_TEST_ASSERT(       (condition), __LINE__, " Expression Evaluated To FALSE")
+#define TEST_ASSERT_TRUE(condition)                                                                UNITY_TEST_ASSERT(       (condition), __LINE__, " Expected TRUE Was FALSE")
+#define TEST_ASSERT_UNLESS(condition)                                                              UNITY_TEST_ASSERT(      !(condition), __LINE__, " Expression Evaluated To TRUE")
+#define TEST_ASSERT_FALSE(condition)                                                               UNITY_TEST_ASSERT(      !(condition), __LINE__, " Expected FALSE Was TRUE")
+#define TEST_ASSERT_NULL(pointer)                                                                  UNITY_TEST_ASSERT_NULL(    (pointer), __LINE__, " Expected NULL")
+#define TEST_ASSERT_NOT_NULL(pointer)                                                              UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, " Expected Non-NULL")
+
+//Integers (of all sizes)
+#define TEST_ASSERT_EQUAL_INT(expected, actual)                                                    UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_INT8(expected, actual)                                                   UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_INT16(expected, actual)                                                  UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_INT32(expected, actual)                                                  UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_INT64(expected, actual)                                                  UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL(expected, actual)                                                        UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_NOT_EQUAL(expected, actual)                                                    UNITY_TEST_ASSERT(((expected) !=  (actual)), __LINE__, " Expected Not-Equal")
+#define TEST_ASSERT_EQUAL_UINT(expected, actual)                                                   UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_UINT8(expected, actual)                                                  UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_UINT16(expected, actual)                                                 UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_UINT32(expected, actual)                                                 UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_UINT64(expected, actual)                                                 UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX(expected, actual)                                                    UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX8(expected, actual)                                                   UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX16(expected, actual)                                                  UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX32(expected, actual)                                                  UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX64(expected, actual)                                                  UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_BITS(mask, expected, actual)                                                   UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_BITS_HIGH(mask, actual)                                                        UNITY_TEST_ASSERT_BITS((mask), (_UU32)(-1), (actual), __LINE__, NULL)
+#define TEST_ASSERT_BITS_LOW(mask, actual)                                                         UNITY_TEST_ASSERT_BITS((mask), (_UU32)(0), (actual), __LINE__, NULL)
+#define TEST_ASSERT_BIT_HIGH(bit, actual)                                                          UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(-1), (actual), __LINE__, NULL)
+#define TEST_ASSERT_BIT_LOW(bit, actual)                                                           UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(0), (actual), __LINE__, NULL)
+
+//Integer Ranges (of all sizes)
+#define TEST_ASSERT_INT_WITHIN(delta, expected, actual)                                            UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_UINT_WITHIN(delta, expected, actual)                                           UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_HEX_WITHIN(delta, expected, actual)                                            UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_HEX8_WITHIN(delta, expected, actual)                                           UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_HEX16_WITHIN(delta, expected, actual)                                          UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_HEX32_WITHIN(delta, expected, actual)                                          UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_HEX64_WITHIN(delta, expected, actual)                                          UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, __LINE__, NULL)
+
+//Structs and Strings
+#define TEST_ASSERT_EQUAL_PTR(expected, actual)                                                    UNITY_TEST_ASSERT_EQUAL_PTR((expected), (actual), __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_STRING(expected, actual)                                                 UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_MEMORY(expected, actual, len)                                            UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, __LINE__, NULL)
+
+//Arrays
+#define TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements)                                UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements)                               UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements)                              UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements)                              UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements)                              UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements)                               UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements)                              UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements)                             UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements)                             UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements)                             UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX_ARRAY(expected, actual, num_elements)                                UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements)                               UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements)                              UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements)                              UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements)                              UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements)                                UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements)                             UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements)                        UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, __LINE__, NULL)
+
+//Floating Point (If Enabled)
+#define TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual)                                          UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_FLOAT(expected, actual)                                                  UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements)                              UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+
+//Double (If Enabled)
+#define TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual)                                         UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_DOUBLE(expected, actual)                                                 UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, __LINE__, NULL)
+#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements)                             UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, __LINE__, NULL)
+
+
+//-------------------------------------------------------
+// Test Asserts (with additional messages)
+//-------------------------------------------------------
+
+//Boolean
+#define TEST_ASSERT_MESSAGE(condition, message)                                                    UNITY_TEST_ASSERT(       (condition), __LINE__, message)
+#define TEST_ASSERT_TRUE_MESSAGE(condition, message)                                               UNITY_TEST_ASSERT(       (condition), __LINE__, message)
+#define TEST_ASSERT_UNLESS_MESSAGE(condition, message)                                             UNITY_TEST_ASSERT(      !(condition), __LINE__, message)
+#define TEST_ASSERT_FALSE_MESSAGE(condition, message)                                              UNITY_TEST_ASSERT(      !(condition), __LINE__, message)
+#define TEST_ASSERT_NULL_MESSAGE(pointer, message)                                                 UNITY_TEST_ASSERT_NULL(    (pointer), __LINE__, message)
+#define TEST_ASSERT_NOT_NULL_MESSAGE(pointer, message)                                             UNITY_TEST_ASSERT_NOT_NULL((pointer), __LINE__, message)
+
+//Integers (of all sizes)
+#define TEST_ASSERT_EQUAL_INT_MESSAGE(expected, actual, message)                                   UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_INT8_MESSAGE(expected, actual, message)                                  UNITY_TEST_ASSERT_EQUAL_INT8((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_INT16_MESSAGE(expected, actual, message)                                 UNITY_TEST_ASSERT_EQUAL_INT16((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_INT32_MESSAGE(expected, actual, message)                                 UNITY_TEST_ASSERT_EQUAL_INT32((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_INT64_MESSAGE(expected, actual, message)                                 UNITY_TEST_ASSERT_EQUAL_INT64((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_MESSAGE(expected, actual, message)                                       UNITY_TEST_ASSERT_EQUAL_INT((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_NOT_EQUAL_MESSAGE(expected, actual, message)                                   UNITY_TEST_ASSERT(((expected) !=  (actual)), __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT_MESSAGE(expected, actual, message)                                  UNITY_TEST_ASSERT_EQUAL_UINT( (expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT8_MESSAGE(expected, actual, message)                                 UNITY_TEST_ASSERT_EQUAL_UINT8( (expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT16_MESSAGE(expected, actual, message)                                UNITY_TEST_ASSERT_EQUAL_UINT16( (expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT32_MESSAGE(expected, actual, message)                                UNITY_TEST_ASSERT_EQUAL_UINT32( (expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT64_MESSAGE(expected, actual, message)                                UNITY_TEST_ASSERT_EQUAL_UINT64( (expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX_MESSAGE(expected, actual, message)                                   UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX8_MESSAGE(expected, actual, message)                                  UNITY_TEST_ASSERT_EQUAL_HEX8( (expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX16_MESSAGE(expected, actual, message)                                 UNITY_TEST_ASSERT_EQUAL_HEX16((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX32_MESSAGE(expected, actual, message)                                 UNITY_TEST_ASSERT_EQUAL_HEX32((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX64_MESSAGE(expected, actual, message)                                 UNITY_TEST_ASSERT_EQUAL_HEX64((expected), (actual), __LINE__, message)
+#define TEST_ASSERT_BITS_MESSAGE(mask, expected, actual, message)                                  UNITY_TEST_ASSERT_BITS((mask), (expected), (actual), __LINE__, message)
+#define TEST_ASSERT_BITS_HIGH_MESSAGE(mask, actual, message)                                       UNITY_TEST_ASSERT_BITS((mask), (_UU32)(-1), (actual), __LINE__, message)
+#define TEST_ASSERT_BITS_LOW_MESSAGE(mask, actual, message)                                        UNITY_TEST_ASSERT_BITS((mask), (_UU32)(0), (actual), __LINE__, message)
+#define TEST_ASSERT_BIT_HIGH_MESSAGE(bit, actual, message)                                         UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(-1), (actual), __LINE__, message)
+#define TEST_ASSERT_BIT_LOW_MESSAGE(bit, actual, message)                                          UNITY_TEST_ASSERT_BITS(((_UU32)1 << bit), (_UU32)(0), (actual), __LINE__, message)
+
+//Integer Ranges (of all sizes)
+#define TEST_ASSERT_INT_WITHIN_MESSAGE(delta, expected, actual, message)                           UNITY_TEST_ASSERT_INT_WITHIN(delta, expected, actual, __LINE__, message)
+#define TEST_ASSERT_UINT_WITHIN_MESSAGE(delta, expected, actual, message)                          UNITY_TEST_ASSERT_UINT_WITHIN(delta, expected, actual, __LINE__, message)
+#define TEST_ASSERT_HEX_WITHIN_MESSAGE(delta, expected, actual, message)                           UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, message)
+#define TEST_ASSERT_HEX8_WITHIN_MESSAGE(delta, expected, actual, message)                          UNITY_TEST_ASSERT_HEX8_WITHIN(delta, expected, actual, __LINE__, message)
+#define TEST_ASSERT_HEX16_WITHIN_MESSAGE(delta, expected, actual, message)                         UNITY_TEST_ASSERT_HEX16_WITHIN(delta, expected, actual, __LINE__, message)
+#define TEST_ASSERT_HEX32_WITHIN_MESSAGE(delta, expected, actual, message)                         UNITY_TEST_ASSERT_HEX32_WITHIN(delta, expected, actual, __LINE__, message)
+#define TEST_ASSERT_HEX64_WITHIN_MESSAGE(delta, expected, actual, message)                         UNITY_TEST_ASSERT_HEX64_WITHIN(delta, expected, actual, __LINE__, message)
+
+//Structs and Strings
+#define TEST_ASSERT_EQUAL_PTR_MESSAGE(expected, actual, message)                                   UNITY_TEST_ASSERT_EQUAL_PTR(expected, actual, __LINE__, message)
+#define TEST_ASSERT_EQUAL_STRING_MESSAGE(expected, actual, message)                                UNITY_TEST_ASSERT_EQUAL_STRING(expected, actual, __LINE__, message)
+#define TEST_ASSERT_EQUAL_MEMORY_MESSAGE(expected, actual, len, message)                           UNITY_TEST_ASSERT_EQUAL_MEMORY(expected, actual, len, __LINE__, message)
+
+//Arrays
+#define TEST_ASSERT_EQUAL_INT_ARRAY_MESSAGE(expected, actual, num_elements, message)               UNITY_TEST_ASSERT_EQUAL_INT_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_INT8_ARRAY_MESSAGE(expected, actual, num_elements, message)              UNITY_TEST_ASSERT_EQUAL_INT8_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_INT16_ARRAY_MESSAGE(expected, actual, num_elements, message)             UNITY_TEST_ASSERT_EQUAL_INT16_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_INT32_ARRAY_MESSAGE(expected, actual, num_elements, message)             UNITY_TEST_ASSERT_EQUAL_INT32_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_INT64_ARRAY_MESSAGE(expected, actual, num_elements, message)             UNITY_TEST_ASSERT_EQUAL_INT64_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT_ARRAY_MESSAGE(expected, actual, num_elements, message)              UNITY_TEST_ASSERT_EQUAL_UINT_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT8_ARRAY_MESSAGE(expected, actual, num_elements, message)             UNITY_TEST_ASSERT_EQUAL_UINT8_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT16_ARRAY_MESSAGE(expected, actual, num_elements, message)            UNITY_TEST_ASSERT_EQUAL_UINT16_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT32_ARRAY_MESSAGE(expected, actual, num_elements, message)            UNITY_TEST_ASSERT_EQUAL_UINT32_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_UINT64_ARRAY_MESSAGE(expected, actual, num_elements, message)            UNITY_TEST_ASSERT_EQUAL_UINT64_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX_ARRAY_MESSAGE(expected, actual, num_elements, message)               UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX8_ARRAY_MESSAGE(expected, actual, num_elements, message)              UNITY_TEST_ASSERT_EQUAL_HEX8_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX16_ARRAY_MESSAGE(expected, actual, num_elements, message)             UNITY_TEST_ASSERT_EQUAL_HEX16_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX32_ARRAY_MESSAGE(expected, actual, num_elements, message)             UNITY_TEST_ASSERT_EQUAL_HEX32_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_HEX64_ARRAY_MESSAGE(expected, actual, num_elements, message)             UNITY_TEST_ASSERT_EQUAL_HEX64_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_PTR_ARRAY_MESSAGE(expected, actual, num_elements, message)               UNITY_TEST_ASSERT_EQUAL_PTR_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_STRING_ARRAY_MESSAGE(expected, actual, num_elements, message)            UNITY_TEST_ASSERT_EQUAL_STRING_ARRAY(expected, actual, num_elements, __LINE__, message)
+#define TEST_ASSERT_EQUAL_MEMORY_ARRAY_MESSAGE(expected, actual, len, num_elements, message)       UNITY_TEST_ASSERT_EQUAL_MEMORY_ARRAY(expected, actual, len, num_elements, __LINE__, message)
+
+//Floating Point (If Enabled)
+#define TEST_ASSERT_FLOAT_WITHIN_MESSAGE(delta, expected, actual, message)                         UNITY_TEST_ASSERT_FLOAT_WITHIN(delta, expected, actual, __LINE__, message)
+#define TEST_ASSERT_EQUAL_FLOAT_MESSAGE(expected, actual, message)                                 UNITY_TEST_ASSERT_EQUAL_FLOAT(expected, actual, __LINE__, message)
+#define TEST_ASSERT_EQUAL_FLOAT_ARRAY_MESSAGE(expected, actual, num_elements, message)             UNITY_TEST_ASSERT_EQUAL_FLOAT_ARRAY(expected, actual, num_elements, __LINE__, message)
+
+//Double (If Enabled)
+#define TEST_ASSERT_DOUBLE_WITHIN_MESSAGE(delta, expected, actual, message)                        UNITY_TEST_ASSERT_DOUBLE_WITHIN(delta, expected, actual, __LINE__, message)
+#define TEST_ASSERT_EQUAL_DOUBLE_MESSAGE(expected, actual, message)                                UNITY_TEST_ASSERT_EQUAL_DOUBLE(expected, actual, __LINE__, message)
+#define TEST_ASSERT_EQUAL_DOUBLE_ARRAY_MESSAGE(expected, actual, num_elements, message)            UNITY_TEST_ASSERT_EQUAL_DOUBLE_ARRAY(expected, actual, num_elements, __LINE__, message)
+
+#endif



Mime
View raw message