mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-03 00:39:59 +00:00
The array plugin can now compare strings as byte arrays, even though they are treated like strings everywhere else. (Fixes #262 and #177)
This commit is contained in:
@@ -21,7 +21,7 @@ class CMockGeneratorPluginArray
|
|||||||
|
|
||||||
def instance_typedefs(function)
|
def instance_typedefs(function)
|
||||||
function[:args].inject('') do |all, arg|
|
function[:args].inject('') do |all, arg|
|
||||||
arg[:ptr?] ? all + " int Expected_#{arg[:name]}_Depth;\n" : all
|
arg[:ptr?] || arg[:string?] ? all + " int Expected_#{arg[:name]}_Depth;\n" : all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -30,35 +30,36 @@ class CMockGeneratorPluginArray
|
|||||||
|
|
||||||
func_name = function[:name]
|
func_name = function[:name]
|
||||||
|
|
||||||
# C function signature: always explicit depth for every pointer arg
|
# C function signature: always explicit depth for every pointer/string arg
|
||||||
args_string = function[:args].map do |m|
|
args_string = function[:args].map do |m|
|
||||||
m[:ptr?] ? "#{@utils.arg_declaration(m)}, int #{m[:name]}_Depth" : @utils.arg_declaration(m)
|
m[:ptr?] || m[:string?] ? "#{@utils.arg_declaration(m)}, int #{m[:name]}_Depth" : @utils.arg_declaration(m)
|
||||||
end.join(', ')
|
end.join(', ')
|
||||||
|
|
||||||
# Short macro params: paired ptrs (before OR after) omit _Depth (auto-filled from paired size arg)
|
# Short macro params: paired ptrs (before OR after) omit _Depth (auto-filled from paired size arg)
|
||||||
|
# string? args always need an explicit _Depth
|
||||||
args_call_i = function[:args].map do |m|
|
args_call_i = function[:args].map do |m|
|
||||||
m[:ptr?] && !m[:array_size_name] ? "#{m[:name]}, #{m[:name]}_Depth" : m[:name].to_s
|
(m[:ptr?] && !m[:array_size_name]) || m[:string?] ? "#{m[:name]}, #{m[:name]}_Depth" : m[:name].to_s
|
||||||
end.join(', ')
|
end.join(', ')
|
||||||
|
|
||||||
# Short macro call: paired ptrs pass paired size name as depth automatically
|
# Short macro call: paired ptrs pass paired size name as depth automatically
|
||||||
args_call_o = function[:args].map do |m|
|
args_call_o = function[:args].map do |m|
|
||||||
if m[:ptr?] && m[:array_size_name]
|
if m[:ptr?] && m[:array_size_name]
|
||||||
"#{m[:name]}, (#{m[:array_size_name]})"
|
"#{m[:name]}, (#{m[:array_size_name]})"
|
||||||
elsif m[:ptr?]
|
elsif m[:ptr?] || m[:string?]
|
||||||
"#{m[:name]}, (#{m[:name]}_Depth)"
|
"#{m[:name]}, (#{m[:name]}_Depth)"
|
||||||
else
|
else
|
||||||
m[:name].to_s
|
m[:name].to_s
|
||||||
end
|
end
|
||||||
end.join(', ')
|
end.join(', ')
|
||||||
|
|
||||||
# Extended macro params: every ptr gets an explicit _Depth
|
# Extended macro params: every ptr/string gets an explicit _Depth
|
||||||
args_call_ext_i = function[:args].map do |m|
|
args_call_ext_i = function[:args].map do |m|
|
||||||
m[:ptr?] ? "#{m[:name]}, #{m[:name]}_Depth" : m[:name].to_s
|
m[:ptr?] || m[:string?] ? "#{m[:name]}, #{m[:name]}_Depth" : m[:name].to_s
|
||||||
end.join(', ')
|
end.join(', ')
|
||||||
|
|
||||||
# Extended macro call: every ptr passes (name_Depth)
|
# Extended macro call: every ptr/string passes (name_Depth)
|
||||||
args_call_ext_o = function[:args].map do |m|
|
args_call_ext_o = function[:args].map do |m|
|
||||||
m[:ptr?] ? "#{m[:name]}, (#{m[:name]}_Depth)" : m[:name].to_s
|
m[:ptr?] || m[:string?] ? "#{m[:name]}, (#{m[:name]}_Depth)" : m[:name].to_s
|
||||||
end.join(', ')
|
end.join(', ')
|
||||||
|
|
||||||
has_paired = function[:args].any? { |m| m[:array_size_name] }
|
has_paired = function[:args].any? { |m| m[:array_size_name] }
|
||||||
@@ -90,14 +91,15 @@ class CMockGeneratorPluginArray
|
|||||||
lines = []
|
lines = []
|
||||||
func_name = function[:name]
|
func_name = function[:name]
|
||||||
|
|
||||||
# C function: always explicit depth for every pointer arg
|
# C function: always explicit depth for every pointer/string arg
|
||||||
args_string = function[:args].map do |m|
|
args_string = function[:args].map do |m|
|
||||||
m[:ptr?] ? "#{@utils.arg_declaration(m)}, int #{m[:name]}_Depth" : @utils.arg_declaration(m)
|
m[:ptr?] || m[:string?] ? "#{@utils.arg_declaration(m)}, int #{m[:name]}_Depth" : @utils.arg_declaration(m)
|
||||||
end.join(', ')
|
end.join(', ')
|
||||||
|
|
||||||
# Call to CMockExpectParameters_: :before-paired ptrs pass only ptr name (their depth is set from paired size arg)
|
# Call to CMockExpectParameters_: :before-paired ptrs pass only ptr name (their depth is set from paired size arg)
|
||||||
|
# string? args always pass their depth explicitly
|
||||||
call_string = function[:args].map do |m|
|
call_string = function[:args].map do |m|
|
||||||
m[:ptr?] && m[:array_size_order] != :before ? "#{m[:name]}, #{m[:name]}_Depth" : m[:name]
|
(m[:ptr?] && m[:array_size_order] != :before) || m[:string?] ? "#{m[:name]}, #{m[:name]}_Depth" : m[:name]
|
||||||
end.join(', ')
|
end.join(', ')
|
||||||
|
|
||||||
lines << if function[:return][:void?]
|
lines << if function[:return][:void?]
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ class CMockGeneratorUtils
|
|||||||
args_string = function[:args].map do |m|
|
args_string = function[:args].map do |m|
|
||||||
if m[:ptr?] && m[:array_size_order] == :before
|
if m[:ptr?] && m[:array_size_order] == :before
|
||||||
arg_declaration(m)
|
arg_declaration(m)
|
||||||
elsif m[:ptr?]
|
elsif m[:ptr?] || m[:string?]
|
||||||
"#{arg_declaration(m)}, int #{m[:name]}_Depth"
|
"#{arg_declaration(m)}, int #{m[:name]}_Depth"
|
||||||
else
|
else
|
||||||
arg_declaration(m)
|
arg_declaration(m)
|
||||||
@@ -116,7 +116,7 @@ class CMockGeneratorUtils
|
|||||||
body = function[:args].inject('') do |all, arg|
|
body = function[:args].inject('') do |all, arg|
|
||||||
depth = if arg[:ptr?] && arg[:array_size_order] == :before
|
depth = if arg[:ptr?] && arg[:array_size_order] == :before
|
||||||
arg[:array_size_name]
|
arg[:array_size_name]
|
||||||
elsif arg[:ptr?]
|
elsif arg[:ptr?] || arg[:string?]
|
||||||
"#{arg[:name]}_Depth"
|
"#{arg[:name]}_Depth"
|
||||||
else
|
else
|
||||||
1
|
1
|
||||||
@@ -147,6 +147,8 @@ class CMockGeneratorUtils
|
|||||||
m[:name]
|
m[:name]
|
||||||
elsif @arrays && m[:ptr?]
|
elsif @arrays && m[:ptr?]
|
||||||
"#{m[:name]}, 1"
|
"#{m[:name]}, 1"
|
||||||
|
elsif @arrays && m[:string?]
|
||||||
|
"#{m[:name]}, 0"
|
||||||
elsif @arrays && m[:array_size?]
|
elsif @arrays && m[:array_size?]
|
||||||
m[:name]
|
m[:name]
|
||||||
else
|
else
|
||||||
@@ -246,7 +248,7 @@ class CMockGeneratorUtils
|
|||||||
|
|
||||||
def code_verify_an_arg_expectation_with_normal_arrays(function, arg)
|
def code_verify_an_arg_expectation_with_normal_arrays(function, arg)
|
||||||
c_type, arg_name, expected, ignore, unity_func, pre = lookup_expect_type(function, arg)
|
c_type, arg_name, expected, ignore, unity_func, pre = lookup_expect_type(function, arg)
|
||||||
depth_name = arg[:ptr?] ? "cmock_call_instance->Expected_#{arg_name}_Depth" : 1
|
depth_name = arg[:ptr?] || arg[:string?] ? "cmock_call_instance->Expected_#{arg_name}_Depth" : 1
|
||||||
elem_size = ptr_to_array_elem_size(arg, c_type)
|
elem_size = ptr_to_array_elem_size(arg, c_type)
|
||||||
lines = ''
|
lines = ''
|
||||||
lines << " if (!#{ignore})\n" if @ignore_arg
|
lines << " if (!#{ignore})\n" if @ignore_arg
|
||||||
@@ -275,7 +277,14 @@ class CMockGeneratorUtils
|
|||||||
lines << " { #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, #{depth_name}, cmock_line, CMockStringMismatch); }\n"
|
lines << " { #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, #{depth_name}, cmock_line, CMockStringMismatch); }\n"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
lines << " #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, cmock_line, CMockStringMismatch);\n"
|
if arg[:string?]
|
||||||
|
lines << " if (#{depth_name} == 0)\n"
|
||||||
|
lines << " { #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, cmock_line, CMockStringMismatch); }\n"
|
||||||
|
lines << " else\n"
|
||||||
|
lines << " { UNITY_TEST_ASSERT_EQUAL_MEMORY((const void*)(#{pre}#{expected}), (const void*)(#{pre}#{arg_name}), (UNITY_UINT32)(#{depth_name}), cmock_line, CMockStringMismatch); }\n"
|
||||||
|
else
|
||||||
|
lines << " #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, cmock_line, CMockStringMismatch);\n"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
lines << " }\n"
|
lines << " }\n"
|
||||||
lines
|
lines
|
||||||
@@ -283,7 +292,7 @@ class CMockGeneratorUtils
|
|||||||
|
|
||||||
def code_verify_an_arg_expectation_with_smart_arrays(function, arg)
|
def code_verify_an_arg_expectation_with_smart_arrays(function, arg)
|
||||||
c_type, arg_name, expected, ignore, unity_func, pre = lookup_expect_type(function, arg)
|
c_type, arg_name, expected, ignore, unity_func, pre = lookup_expect_type(function, arg)
|
||||||
depth_name = arg[:ptr?] ? "cmock_call_instance->Expected_#{arg_name}_Depth" : 1
|
depth_name = arg[:ptr?] || arg[:string?] ? "cmock_call_instance->Expected_#{arg_name}_Depth" : 1
|
||||||
elem_size = ptr_to_array_elem_size(arg, c_type)
|
elem_size = ptr_to_array_elem_size(arg, c_type)
|
||||||
lines = ''
|
lines = ''
|
||||||
lines << " if (!#{ignore})\n" if @ignore_arg
|
lines << " if (!#{ignore})\n" if @ignore_arg
|
||||||
@@ -314,7 +323,14 @@ class CMockGeneratorUtils
|
|||||||
lines << " { #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, #{depth_name}, cmock_line, CMockStringMismatch); }\n"
|
lines << " { #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, #{depth_name}, cmock_line, CMockStringMismatch); }\n"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
lines << " #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, cmock_line, CMockStringMismatch);\n"
|
if arg[:string?]
|
||||||
|
lines << " if (#{depth_name} == 0)\n"
|
||||||
|
lines << " { #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, cmock_line, CMockStringMismatch); }\n"
|
||||||
|
lines << " else\n"
|
||||||
|
lines << " { UNITY_TEST_ASSERT_EQUAL_MEMORY((const void*)(#{pre}#{expected}), (const void*)(#{pre}#{arg_name}), (UNITY_UINT32)(#{depth_name}), cmock_line, CMockStringMismatch); }\n"
|
||||||
|
else
|
||||||
|
lines << " #{unity_func}(#{pre}#{expected}, #{pre}#{arg_name}, cmock_line, CMockStringMismatch);\n"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
lines << " }\n"
|
lines << " }\n"
|
||||||
lines
|
lines
|
||||||
|
|||||||
@@ -533,6 +533,7 @@ class CMockHeaderParser
|
|||||||
divination = {}
|
divination = {}
|
||||||
|
|
||||||
divination[:ptr?] = divine_ptr(arg)
|
divination[:ptr?] = divine_ptr(arg)
|
||||||
|
divination[:string?] = !divination[:ptr?] && (/(^|\s)(const\s+)?char(\s+const)?\s*\*(?!.*\*)/ =~ arg ? true : false)
|
||||||
divination[:const?] = divine_const(arg)
|
divination[:const?] = divine_const(arg)
|
||||||
|
|
||||||
# an arg containing "const" after the last * is a constant pointer
|
# an arg containing "const" after the last * is a constant pointer
|
||||||
@@ -690,7 +691,7 @@ class CMockHeaderParser
|
|||||||
decl[:args_string] = arg_parts.join(', ')
|
decl[:args_string] = arg_parts.join(', ')
|
||||||
end
|
end
|
||||||
decl[:args_call] = decl[:args].map { |a| a[:name] }.join(', ')
|
decl[:args_call] = decl[:args].map { |a| a[:name] }.join(', ')
|
||||||
decl[:contains_ptr?] = decl[:args].inject(false) { |ptr, arg| arg[:ptr?] ? true : ptr }
|
decl[:contains_ptr?] = decl[:args].inject(false) { |ptr, arg| arg[:ptr?] || arg[:string?] ? true : ptr }
|
||||||
|
|
||||||
if decl[:return][:type].nil? || decl[:name].nil? || decl[:args].nil? ||
|
if decl[:return][:type].nil? || decl[:name].nil? || decl[:args].nil? ||
|
||||||
decl[:return][:type].empty? || decl[:name].empty?
|
decl[:return][:type].empty? || decl[:name].empty?
|
||||||
|
|||||||
@@ -0,0 +1,113 @@
|
|||||||
|
# =========================================================================
|
||||||
|
# CMock - Automatic Mock Generation for C
|
||||||
|
# ThrowTheSwitch.org
|
||||||
|
# Copyright (c) 2007-26 Mike Karlesky, Mark VanderVoord, & Greg Williams
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
# =========================================================================
|
||||||
|
|
||||||
|
---
|
||||||
|
:cmock:
|
||||||
|
:when_ptr: :smart
|
||||||
|
:plugins:
|
||||||
|
- :array
|
||||||
|
|
||||||
|
:systest:
|
||||||
|
:types: |
|
||||||
|
|
||||||
|
:mockable: |
|
||||||
|
void send_message(const char* msg);
|
||||||
|
int process_command(const char* cmd, int len);
|
||||||
|
|
||||||
|
:source:
|
||||||
|
:header: |
|
||||||
|
void function_a(void);
|
||||||
|
void function_b(void);
|
||||||
|
void function_c(void);
|
||||||
|
int function_d(void);
|
||||||
|
int function_e(void);
|
||||||
|
|
||||||
|
:code: |
|
||||||
|
void function_a(void)
|
||||||
|
{
|
||||||
|
send_message("hello");
|
||||||
|
}
|
||||||
|
|
||||||
|
void function_b(void)
|
||||||
|
{
|
||||||
|
send_message("hello");
|
||||||
|
}
|
||||||
|
|
||||||
|
void function_c(void)
|
||||||
|
{
|
||||||
|
send_message("hello");
|
||||||
|
}
|
||||||
|
|
||||||
|
int function_d(void)
|
||||||
|
{
|
||||||
|
return process_command("hello", 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
int function_e(void)
|
||||||
|
{
|
||||||
|
return process_command("hello", 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
:tests:
|
||||||
|
:common: |
|
||||||
|
void setUp(void) {}
|
||||||
|
void tearDown(void) {}
|
||||||
|
|
||||||
|
:units:
|
||||||
|
- :pass: TRUE
|
||||||
|
:should: 'compare char* args as strings using Expect (strcmp) when array plugin active'
|
||||||
|
:code: |
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
send_message_Expect("hello");
|
||||||
|
function_a();
|
||||||
|
}
|
||||||
|
|
||||||
|
- :pass: TRUE
|
||||||
|
:should: 'compare char* args as byte array using ExpectWithArray and pass when bytes match'
|
||||||
|
:code: |
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
send_message_ExpectWithArray("hello", 5);
|
||||||
|
function_b();
|
||||||
|
}
|
||||||
|
|
||||||
|
- :pass: TRUE
|
||||||
|
:should: 'compare char* args as byte array using ExpectWithArray and pass when brief bytes match'
|
||||||
|
:code: |
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
send_message_ExpectWithArray("heXXX", 2);
|
||||||
|
function_b();
|
||||||
|
}
|
||||||
|
|
||||||
|
- :pass: FALSE
|
||||||
|
:should: 'detect mismatch in char* via ExpectWithArray byte comparison'
|
||||||
|
:code: |
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
send_message_ExpectWithArray("hXllo", 5);
|
||||||
|
function_c();
|
||||||
|
}
|
||||||
|
|
||||||
|
- :pass: TRUE
|
||||||
|
:should: 'compare char* with ExpectWithArrayAndReturn and pass when bytes match'
|
||||||
|
:code: |
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
process_command_ExpectWithArrayAndReturn("hello", 5, 5, 42);
|
||||||
|
TEST_ASSERT_EQUAL(42, function_d());
|
||||||
|
}
|
||||||
|
|
||||||
|
- :pass: FALSE
|
||||||
|
:should: 'detect mismatch in char* via ExpectWithArrayAndReturn byte comparison'
|
||||||
|
:code: |
|
||||||
|
test()
|
||||||
|
{
|
||||||
|
process_command_ExpectWithArrayAndReturn("world", 5, 5, 42);
|
||||||
|
TEST_ASSERT_EQUAL(42, function_e());
|
||||||
|
}
|
||||||
@@ -597,7 +597,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
},
|
},
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[{:type=>"int", :name=>"a", :ptr? => false, :const? => false, :const_ptr? => false}],
|
:args=>[{:type=>"int", :name=>"a", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}],
|
||||||
:args_string=>"int a",
|
:args_string=>"int a",
|
||||||
:args_call=>"a"}
|
:args_call=>"a"}
|
||||||
assert_equal(expected, @parser.parse_declaration(@test_project, source))
|
assert_equal(expected, @parser.parse_declaration(@test_project, source))
|
||||||
@@ -643,7 +643,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
},
|
},
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[{:type=>"MY_FUNKY_VOID*", :name=>"bluh", :ptr? => true, :const? => false, :const_ptr? => false}],
|
:args=>[{:type=>"MY_FUNKY_VOID*", :name=>"bluh", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false}],
|
||||||
:args_string=>"MY_FUNKY_VOID* bluh",
|
:args_string=>"MY_FUNKY_VOID* bluh",
|
||||||
:args_call=>"bluh" }
|
:args_call=>"bluh" }
|
||||||
assert_equal(expected, @parser.parse_declaration(@test_project, source))
|
assert_equal(expected, @parser.parse_declaration(@test_project, source))
|
||||||
@@ -745,8 +745,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
},
|
},
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"int", :name=>"a", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"a", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"unsigned int", :name=>"b", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"unsigned int", :name=>"b", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int a, unsigned int b",
|
:args_string=>"int a, unsigned int b",
|
||||||
:args_call=>"a, b" }
|
:args_call=>"a, b" }
|
||||||
@@ -771,9 +771,9 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"uint", :name=>"la", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"uint", :name=>"la", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"int", :name=>"de", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"int", :name=>"de", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"bool", :name=>"da", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"bool", :name=>"da", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"uint la, int de, bool da",
|
:args_string=>"uint la, int de, bool da",
|
||||||
:args_call=>"la, de, da" }
|
:args_call=>"la, de, da" }
|
||||||
@@ -822,8 +822,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"const",
|
:modifier=>"const",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :const? => false, :const_ptr? => false}
|
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int Trinity, unsigned int* Neo",
|
:args_string=>"int Trinity, unsigned int* Neo",
|
||||||
:args_call=>"Trinity, Neo" }
|
:args_call=>"Trinity, Neo" }
|
||||||
@@ -849,8 +849,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:modifier=>"const",
|
:modifier=>"const",
|
||||||
:c_calling_convention=>"__stdcall",
|
:c_calling_convention=>"__stdcall",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :const? => false, :const_ptr? => false}
|
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int Trinity, unsigned int* Neo",
|
:args_string=>"int Trinity, unsigned int* Neo",
|
||||||
:args_call=>"Trinity, Neo" }
|
:args_call=>"Trinity, Neo" }
|
||||||
@@ -874,8 +874,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
},
|
},
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"int", :name=>"a", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"a", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"unsigned int", :name=>"b", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"unsigned int", :name=>"b", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int a, unsigned int b",
|
:args_string=>"int a, unsigned int b",
|
||||||
:args_call=>"a, b" }
|
:args_call=>"a, b" }
|
||||||
@@ -902,8 +902,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"const",
|
:modifier=>"const",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :const? => false, :const_ptr? => false}
|
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int Trinity, unsigned int* Neo",
|
:args_string=>"int Trinity, unsigned int* Neo",
|
||||||
:args_call=>"Trinity, Neo" },
|
:args_call=>"Trinity, Neo" },
|
||||||
@@ -922,8 +922,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"int", :name=>"cmock_arg1", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"cmock_arg1", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"unsigned int*", :name=>"cmock_arg2", :ptr? => true, :const? => false, :const_ptr? => false}
|
{:type=>"unsigned int*", :name=>"cmock_arg2", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int cmock_arg1, unsigned int* cmock_arg2",
|
:args_string=>"int cmock_arg1, unsigned int* cmock_arg2",
|
||||||
:args_call=>"cmock_arg1, cmock_arg2"
|
:args_call=>"cmock_arg1, cmock_arg2"
|
||||||
@@ -951,8 +951,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
},
|
},
|
||||||
:modifier=>"const",
|
:modifier=>"const",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"Trinity", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :const? => false, :const_ptr? => false}
|
{:type=>"unsigned int*", :name=>"Neo", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int Trinity, unsigned int* Neo",
|
:args_string=>"int Trinity, unsigned int* Neo",
|
||||||
:args_call=>"Trinity, Neo"
|
:args_call=>"Trinity, Neo"
|
||||||
@@ -1070,14 +1070,14 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:var_arg => nil,
|
:var_arg => nil,
|
||||||
:args_string => "int const* cmock_arg1, int* const cmock_arg2, const int* cmock_arg3, const int* const cmock_arg4, " +
|
:args_string => "int const* cmock_arg1, int* const cmock_arg2, const int* cmock_arg3, const int* const cmock_arg4, " +
|
||||||
"int const* const cmock_arg5, int* cmock_arg6, int cmock_arg7, const int cmock_arg8",
|
"int const* const cmock_arg5, int* cmock_arg6, int cmock_arg7, const int cmock_arg8",
|
||||||
:args => [{ :type=>"int const*", :name => "cmock_arg1", :ptr? => true, :const? => true, :const_ptr? => false },
|
:args => [{ :type=>"int const*", :name => "cmock_arg1", :ptr? => true, :string? => false, :const? => true, :const_ptr? => false },
|
||||||
{ :type=>"int*", :name => "cmock_arg2", :ptr? => true, :const? => false, :const_ptr? => true },
|
{ :type=>"int*", :name => "cmock_arg2", :ptr? => true, :string? => false, :const? => false, :const_ptr? => true },
|
||||||
{ :type=>"const int*", :name => "cmock_arg3", :ptr? => true, :const? => true, :const_ptr? => false },
|
{ :type=>"const int*", :name => "cmock_arg3", :ptr? => true, :string? => false, :const? => true, :const_ptr? => false },
|
||||||
{ :type=>"const int*", :name => "cmock_arg4", :ptr? => true, :const? => true, :const_ptr? => true },
|
{ :type=>"const int*", :name => "cmock_arg4", :ptr? => true, :string? => false, :const? => true, :const_ptr? => true },
|
||||||
{ :type=>"int const*", :name => "cmock_arg5", :ptr? => true, :const? => true, :const_ptr? => true },
|
{ :type=>"int const*", :name => "cmock_arg5", :ptr? => true, :string? => false, :const? => true, :const_ptr? => true },
|
||||||
{ :type=>"int*", :name => "cmock_arg6", :ptr? => true, :const? => false, :const_ptr? => false },
|
{ :type=>"int*", :name => "cmock_arg6", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false },
|
||||||
{ :type=>"int", :name => "cmock_arg7", :ptr? => false, :const? => false, :const_ptr? => false },
|
{ :type=>"int", :name => "cmock_arg7", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false },
|
||||||
{ :type=>"int", :name => "cmock_arg8", :ptr? => false, :const? => true, :const_ptr? => false }],
|
{ :type=>"int", :name => "cmock_arg8", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false }],
|
||||||
:args_call => "cmock_arg1, cmock_arg2, cmock_arg3, cmock_arg4, cmock_arg5, cmock_arg6, cmock_arg7, cmock_arg8",
|
:args_call => "cmock_arg1, cmock_arg2, cmock_arg3, cmock_arg4, cmock_arg5, cmock_arg6, cmock_arg7, cmock_arg8",
|
||||||
:contains_ptr? => true
|
:contains_ptr? => true
|
||||||
}]
|
}]
|
||||||
@@ -1105,14 +1105,14 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:var_arg => nil,
|
:var_arg => nil,
|
||||||
:args_string => "int const* param1, int* const param2, const int* param3, const int* const param4, " +
|
:args_string => "int const* param1, int* const param2, const int* param3, const int* const param4, " +
|
||||||
"int const* const param5, int* param6, int param7, const int param8",
|
"int const* const param5, int* param6, int param7, const int param8",
|
||||||
:args => [{ :type=>"int const*", :name => "param1", :ptr? => true, :const? => true, :const_ptr? => false },
|
:args => [{ :type=>"int const*", :name => "param1", :ptr? => true, :string? => false, :const? => true, :const_ptr? => false },
|
||||||
{ :type=>"int*", :name => "param2", :ptr? => true, :const? => false, :const_ptr? => true },
|
{ :type=>"int*", :name => "param2", :ptr? => true, :string? => false, :const? => false, :const_ptr? => true },
|
||||||
{ :type=>"const int*", :name => "param3", :ptr? => true, :const? => true, :const_ptr? => false },
|
{ :type=>"const int*", :name => "param3", :ptr? => true, :string? => false, :const? => true, :const_ptr? => false },
|
||||||
{ :type=>"const int*", :name => "param4", :ptr? => true, :const? => true, :const_ptr? => true },
|
{ :type=>"const int*", :name => "param4", :ptr? => true, :string? => false, :const? => true, :const_ptr? => true },
|
||||||
{ :type=>"int const*", :name => "param5", :ptr? => true, :const? => true, :const_ptr? => true },
|
{ :type=>"int const*", :name => "param5", :ptr? => true, :string? => false, :const? => true, :const_ptr? => true },
|
||||||
{ :type=>"int*", :name => "param6", :ptr? => true, :const? => false, :const_ptr? => false },
|
{ :type=>"int*", :name => "param6", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false },
|
||||||
{ :type=>"int", :name => "param7", :ptr? => false, :const? => false, :const_ptr? => false },
|
{ :type=>"int", :name => "param7", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false },
|
||||||
{ :type=>"int", :name => "param8", :ptr? => false, :const? => true, :const_ptr? => false }],
|
{ :type=>"int", :name => "param8", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false }],
|
||||||
:args_call => "param1, param2, param3, param4, param5, param6, param7, param8",
|
:args_call => "param1, param2, param3, param4, param5, param6, param7, param8",
|
||||||
:contains_ptr? => true
|
:contains_ptr? => true
|
||||||
}].freeze
|
}].freeze
|
||||||
@@ -1137,8 +1137,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:const_ptr? => false
|
:const_ptr? => false
|
||||||
},
|
},
|
||||||
:var_arg => nil,
|
:var_arg => nil,
|
||||||
:args => [{ :type => "Page*", :name => "book", :ptr? => true, :const? => false, :const_ptr? => false },
|
:args => [{ :type => "Page*", :name => "book", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false },
|
||||||
{ :type => "const int*", :name => "values", :ptr? => true, :const? => true, :const_ptr? => false }],
|
{ :type => "const int*", :name => "values", :ptr? => true, :string? => false, :const? => true, :const_ptr? => false }],
|
||||||
:args_string => "Book book, const IntArray values",
|
:args_string => "Book book, const IntArray values",
|
||||||
:args_call => "book, values",
|
:args_call => "book, values",
|
||||||
:contains_ptr? => true
|
:contains_ptr? => true
|
||||||
@@ -1170,7 +1170,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
},
|
},
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"int", :name=>"SingAlong", :ptr? => false, :const? => false, :const_ptr? => false} ],
|
:args=>[ {:type=>"int", :name=>"SingAlong", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false} ],
|
||||||
:args_string=>"int SingAlong",
|
:args_string=>"int SingAlong",
|
||||||
:args_call=>"SingAlong"
|
:args_call=>"SingAlong"
|
||||||
},
|
},
|
||||||
@@ -1217,7 +1217,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"struct SingAlong", :name=>"Blog", :ptr? => false, :const? => false, :const_ptr? => false} ],
|
:args=>[ {:type=>"struct SingAlong", :name=>"Blog", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false} ],
|
||||||
:args_string=>"struct SingAlong Blog",
|
:args_string=>"struct SingAlong Blog",
|
||||||
:args_call=>"Blog"
|
:args_call=>"Blog"
|
||||||
},
|
},
|
||||||
@@ -1236,7 +1236,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"struct const _KeepYourHeadUp_*", :name=>"BillyBuddy", :ptr? => true, :const? => true, :const_ptr? => true} ],
|
:args=>[ {:type=>"struct const _KeepYourHeadUp_*", :name=>"BillyBuddy", :ptr? => true, :string? => false, :const? => true, :const_ptr? => true} ],
|
||||||
:args_string=>"struct const _KeepYourHeadUp_* const BillyBuddy",
|
:args_string=>"struct const _KeepYourHeadUp_* const BillyBuddy",
|
||||||
:args_call=>"BillyBuddy"
|
:args_call=>"BillyBuddy"
|
||||||
},
|
},
|
||||||
@@ -1279,8 +1279,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"union STARS_AND_STRIPES*", :name=>"a", :ptr? => true, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"union STARS_AND_STRIPES*", :name=>"a", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"union AFL_CIO", :name=>"b", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"union AFL_CIO", :name=>"b", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"union STARS_AND_STRIPES* a, union AFL_CIO b",
|
:args_string=>"union STARS_AND_STRIPES* a, union AFL_CIO b",
|
||||||
:args_call=>"a, b" }]
|
:args_call=>"a, b" }]
|
||||||
@@ -1305,11 +1305,11 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=> "unsigned int", :name=>"const_param", :ptr? => false, :const? => true, :const_ptr? => false},
|
:args=>[ {:type=> "unsigned int", :name=>"const_param", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false},
|
||||||
{:type=>"int", :name=>"int_param", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"int", :name=>"int_param", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"int", :name=>"integer", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"int", :name=>"integer", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"char", :name=>"character", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"char", :name=>"character", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"int*", :name=>"constant", :ptr? => true, :const? => false, :const_ptr? => true}
|
{:type=>"int*", :name=>"constant", :ptr? => true, :string? => false, :const? => false, :const_ptr? => true}
|
||||||
],
|
],
|
||||||
:args_string=>"const unsigned int const_param, int int_param, int integer, char character, int* const constant",
|
:args_string=>"const unsigned int const_param, int int_param, int integer, char character, int* const constant",
|
||||||
:args_call=>"const_param, int_param, integer, character, constant" }]
|
:args_call=>"const_param, int_param, integer, character, constant" }]
|
||||||
@@ -1334,11 +1334,11 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"integer", :name=>"param", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"integer", :name=>"param", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"character", :name=>"thing", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"character", :name=>"thing", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"longint*", :name=>"junk", :ptr? => true, :const? => false, :const_ptr? => false},
|
{:type=>"longint*", :name=>"junk", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"constant", :name=>"value", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"constant", :name=>"value", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"int32_t", :name=>"number", :ptr? => false, :const? => true, :const_ptr? => false}
|
{:type=>"int32_t", :name=>"number", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"integer param, character thing, longint* junk, constant value, int32_t const number",
|
:args_string=>"integer param, character thing, longint* junk, constant value, int32_t const number",
|
||||||
:args_call=>"param, thing, junk, value, number" }]
|
:args_call=>"param, thing, junk, value, number" }]
|
||||||
@@ -1363,10 +1363,10 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"signed char", :name=>"abc", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"signed char", :name=>"abc", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"unsigned long int", :name=>"xyz_123", :ptr? => false, :const? => true, :const_ptr? => false},
|
{:type=>"unsigned long int", :name=>"xyz_123", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false},
|
||||||
{:type=>"unsigned int", :name=>"abc_123", :ptr? => false, :const? => true, :const_ptr? => false},
|
{:type=>"unsigned int", :name=>"abc_123", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false},
|
||||||
{:type=>"long long", :name=>"arm_of_the_law", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"long long", :name=>"arm_of_the_law", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"signed char abc, const unsigned long int xyz_123, unsigned int const abc_123, long long arm_of_the_law",
|
:args_string=>"signed char abc, const unsigned long int xyz_123, unsigned int const abc_123, long long arm_of_the_law",
|
||||||
:args_call=>"abc, xyz_123, abc_123, arm_of_the_law" }]
|
:args_call=>"abc, xyz_123, abc_123, arm_of_the_law" }]
|
||||||
@@ -1391,10 +1391,10 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"CUSTOM_TYPE", :name=>"abc", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"CUSTOM_TYPE", :name=>"abc", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"CUSTOM_TYPE*", :name=>"xyz_123", :ptr? => true, :const? => false, :const_ptr? => false},
|
{:type=>"CUSTOM_TYPE*", :name=>"xyz_123", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"CUSTOM_TYPE", :name=>"abcxyz", :ptr? => false, :const? => true, :const_ptr? => false},
|
{:type=>"CUSTOM_TYPE", :name=>"abcxyz", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false},
|
||||||
{:type=>"struct CUSTOM_TYPE const*", :name=>"abc123", :ptr? => true, :const? => true, :const_ptr? => true}
|
{:type=>"struct CUSTOM_TYPE const*", :name=>"abc123", :ptr? => true, :string? => false, :const? => true, :const_ptr? => true}
|
||||||
],
|
],
|
||||||
:args_string=>"CUSTOM_TYPE abc, CUSTOM_TYPE* xyz_123, CUSTOM_TYPE const abcxyz, struct CUSTOM_TYPE const* const abc123",
|
:args_string=>"CUSTOM_TYPE abc, CUSTOM_TYPE* xyz_123, CUSTOM_TYPE const abcxyz, struct CUSTOM_TYPE const* const abc123",
|
||||||
:args_call=>"abc, xyz_123, abcxyz, abc123" }]
|
:args_call=>"abc, xyz_123, abcxyz, abc123" }]
|
||||||
@@ -1406,11 +1406,11 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
source = 'void KeyOperated(CUSTOM_TYPE thing1[], int thing2 [ ], ' \
|
source = 'void KeyOperated(CUSTOM_TYPE thing1[], int thing2 [ ], ' \
|
||||||
'char thing3 [][2 ][ 3], int* thing4[4], u8 thing5[((u8)((5 + 5*2)/3))])'
|
'char thing3 [][2 ][ 3], int* thing4[4], u8 thing5[((u8)((5 + 5*2)/3))])'
|
||||||
expected_args = [
|
expected_args = [
|
||||||
{ type: 'CUSTOM_TYPE*', name: 'thing1', ptr?: true, const?: false, const_ptr?: false, array_dims: [''] },
|
{ type: 'CUSTOM_TYPE*', name: 'thing1', ptr?: true, string?: false, const?: false, const_ptr?: false, array_dims: [''] },
|
||||||
{ type: 'int*', name: 'thing2', ptr?: true, const?: false, const_ptr?: false, array_dims: [''] },
|
{ type: 'int*', name: 'thing2', ptr?: true, string?: false, const?: false, const_ptr?: false, array_dims: [''] },
|
||||||
{ type: 'char*', name: 'thing3', ptr?: false, const?: false, const_ptr?: false, array_dims: ['', '2', '3'] },
|
{ type: 'char*', name: 'thing3', ptr?: false, string?: true, const?: false, const_ptr?: false, array_dims: ['', '2', '3'] },
|
||||||
{ type: 'int**', name: 'thing4', ptr?: true, const?: false, const_ptr?: false, array_dims: ['4'] },
|
{ type: 'int**', name: 'thing4', ptr?: true, string?: false, const?: false, const_ptr?: false, array_dims: ['4'] },
|
||||||
{ type: 'u8*', name: 'thing5', ptr?: true, const?: false, const_ptr?: false, array_dims: ['((u8)((5 + 5*2)/3))'] }
|
{ type: 'u8*', name: 'thing5', ptr?: true, string?: false, const?: false, const_ptr?: false, array_dims: ['((u8)((5 + 5*2)/3))'] }
|
||||||
]
|
]
|
||||||
expected = [{:var_arg=>nil,
|
expected = [{:var_arg=>nil,
|
||||||
:return=>{ :type => "void",
|
:return=>{ :type => "void",
|
||||||
@@ -1451,9 +1451,9 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"unsigned CUSTOM_TYPE", :name=>"abc", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"unsigned CUSTOM_TYPE", :name=>"abc", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"unsigned", :name=>"xyz", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"unsigned", :name=>"xyz", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"CUSTOM_TYPE1 CUSTOM_TYPE2", :name=>"pdq", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"CUSTOM_TYPE1 CUSTOM_TYPE2", :name=>"pdq", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"unsigned CUSTOM_TYPE abc, unsigned xyz, CUSTOM_TYPE1 CUSTOM_TYPE2 pdq",
|
:args_string=>"unsigned CUSTOM_TYPE abc, unsigned xyz, CUSTOM_TYPE1 CUSTOM_TYPE2 pdq",
|
||||||
:args_call=>"abc, xyz, pdq" }]
|
:args_call=>"abc, xyz, pdq" }]
|
||||||
@@ -1478,7 +1478,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => false, :const_ptr? => false}
|
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
||||||
:args_call=>"func_ptr" }]
|
:args_call=>"func_ptr" }]
|
||||||
@@ -1505,7 +1505,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => false, :const_ptr? => false}
|
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
||||||
:args_call=>"func_ptr" }]
|
:args_call=>"func_ptr" }]
|
||||||
@@ -1532,7 +1532,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => false, :const_ptr? => false}
|
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
||||||
:args_call=>"func_ptr" }]
|
:args_call=>"func_ptr" }]
|
||||||
@@ -1559,7 +1559,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => false, :const_ptr? => false}
|
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
:args_string=>"cmock_module_func_ptr1 func_ptr",
|
||||||
:args_call=>"func_ptr" }]
|
:args_call=>"func_ptr" }]
|
||||||
@@ -1586,7 +1586,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => true, :const_ptr? => false}
|
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"cmock_module_func_ptr1 const func_ptr",
|
:args_string=>"cmock_module_func_ptr1 const func_ptr",
|
||||||
:args_call=>"func_ptr" }]
|
:args_call=>"func_ptr" }]
|
||||||
@@ -1601,7 +1601,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
# expected = [{ :var_arg=>nil,
|
# expected = [{ :var_arg=>nil,
|
||||||
# :return=>{ :type => "void",
|
# :return=>{ :type => "void",
|
||||||
# :name => 'cmock_to_return',
|
# :name => 'cmock_to_return',
|
||||||
# :ptr? => false,
|
# :ptr? => false, :string? => false,
|
||||||
# :const? => false,
|
# :const? => false,
|
||||||
# :const_ptr? => false,
|
# :const_ptr? => false,
|
||||||
# :str => "void cmock_to_return",
|
# :str => "void cmock_to_return",
|
||||||
@@ -1613,7 +1613,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
# :class=>nil,
|
# :class=>nil,
|
||||||
# :modifier=>"",
|
# :modifier=>"",
|
||||||
# :contains_ptr? => false,
|
# :contains_ptr? => false,
|
||||||
# :args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :const? => false, :const_ptr? => false}
|
# :args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
# ],
|
# ],
|
||||||
# :args_string=>"cmock_module_func_ptr1 func_ptr",
|
# :args_string=>"cmock_module_func_ptr1 func_ptr",
|
||||||
# :args_call=>"func_ptr" }]
|
# :args_call=>"func_ptr" }]
|
||||||
@@ -1640,8 +1640,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr1", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"func_ptr1", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"cmock_module_func_ptr2", :name=>"func_ptr2", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"cmock_module_func_ptr2", :name=>"func_ptr2", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"cmock_module_func_ptr1 func_ptr1, cmock_module_func_ptr2 func_ptr2",
|
:args_string=>"cmock_module_func_ptr1 func_ptr1, cmock_module_func_ptr2 func_ptr2",
|
||||||
:args_call=>"func_ptr1, func_ptr2" }]
|
:args_call=>"func_ptr1, func_ptr2" }]
|
||||||
@@ -1668,9 +1668,9 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"uint16_t", :name=>"num1", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"uint16_t", :name=>"num1", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"uint16_t", :name=>"num2", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"uint16_t", :name=>"num2", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"cmock_module_func_ptr1", :name=>"func_ptr1", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"cmock_module_func_ptr1", :name=>"func_ptr1", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"uint16_t num1, uint16_t num2, cmock_module_func_ptr1 func_ptr1",
|
:args_string=>"uint16_t num1, uint16_t num2, cmock_module_func_ptr1 func_ptr1",
|
||||||
:args_call=>"num1, num2, func_ptr1" }]
|
:args_call=>"num1, num2, func_ptr1" }]
|
||||||
@@ -1697,7 +1697,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"cmock_arg1", :ptr? => false, :const? => true, :const_ptr? => false}
|
:args=>[ {:type=>"cmock_module_func_ptr1", :name=>"cmock_arg1", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"cmock_module_func_ptr1 const cmock_arg1",
|
:args_string=>"cmock_module_func_ptr1 const cmock_arg1",
|
||||||
:args_call=>"cmock_arg1" }]
|
:args_call=>"cmock_arg1" }]
|
||||||
@@ -1724,7 +1724,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"char", :name=>"op_code", :ptr? => false, :const? => true, :const_ptr? => false}
|
:args=>[ {:type=>"char", :name=>"op_code", :ptr? => false, :string? => false, :const? => true, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"const char op_code",
|
:args_string=>"const char op_code",
|
||||||
:args_call=>"op_code" }]
|
:args_call=>"op_code" }]
|
||||||
@@ -1803,8 +1803,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"double*", :name=>"foo", :ptr? => true, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"double*", :name=>"foo", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"THING*", :name=>"bar", :ptr? => true, :const? => false, :const_ptr? => false}
|
{:type=>"THING*", :name=>"bar", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"double* foo, THING* bar",
|
:args_string=>"double* foo, THING* bar",
|
||||||
:args_call=>"foo, bar" }]
|
:args_call=>"foo, bar" }]
|
||||||
@@ -1831,11 +1831,11 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"SQLITE_API",
|
:modifier=>"SQLITE_API",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"sqlite3_stmt*", :name=>"cmock_arg2", :ptr? => true, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"sqlite3_stmt*", :name=>"cmock_arg2", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"int", :name=>"cmock_arg3", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"int", :name=>"cmock_arg3", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"const char*", :name=>"cmock_arg4", :ptr? => false, :const? => true, :const_ptr? => false},
|
{:type=>"const char*", :name=>"cmock_arg4", :ptr? => false, :string? => true, :const? => true, :const_ptr? => false},
|
||||||
{:type=>"int", :name=>"n", :ptr? => false, :const? => false, :const_ptr? => false},
|
{:type=>"int", :name=>"n", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"cmock_module_func_ptr1", :name=>"cmock_arg1", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"cmock_module_func_ptr1", :name=>"cmock_arg1", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"sqlite3_stmt* cmock_arg2, int cmock_arg3, const char* cmock_arg4, int n, cmock_module_func_ptr1 cmock_arg1",
|
:args_string=>"sqlite3_stmt* cmock_arg2, int cmock_arg3, const char* cmock_arg4, int n, cmock_module_func_ptr1 cmock_arg1",
|
||||||
:args_call=>"cmock_arg2, cmock_arg3, cmock_arg4, n, cmock_arg1" }]
|
:args_call=>"cmock_arg2, cmock_arg3, cmock_arg4, n, cmock_arg1" }]
|
||||||
@@ -1862,8 +1862,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"int", :name=>"Scully", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"Scully", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"int", :name=>"Mulder", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"int", :name=>"Mulder", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int Scully, int Mulder",
|
:args_string=>"int Scully, int Mulder",
|
||||||
:args_call=>"Scully, Mulder"
|
:args_call=>"Scully, Mulder"
|
||||||
@@ -1888,7 +1888,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => true,
|
:contains_ptr? => true,
|
||||||
:args=>[ {:type=>"void*", :name=>"stuff", :ptr? => true, :const? => false, :const_ptr? => false}
|
:args=>[ {:type=>"void*", :name=>"stuff", :ptr? => true, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"void* stuff",
|
:args_string=>"void* stuff",
|
||||||
:args_call=>"stuff"
|
:args_call=>"stuff"
|
||||||
@@ -1913,8 +1913,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"int", :name=>"Lenny", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"Lenny", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"int", :name=>"Squiggy", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"int", :name=>"Squiggy", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int Lenny, int Squiggy",
|
:args_string=>"int Lenny, int Squiggy",
|
||||||
:args_call=>"Lenny, Squiggy"
|
:args_call=>"Lenny, Squiggy"
|
||||||
@@ -1939,8 +1939,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"int", :name=>"Cliff", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"Cliff", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"int", :name=>"Claire", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"int", :name=>"Claire", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int Cliff, int Claire",
|
:args_string=>"int Cliff, int Claire",
|
||||||
:args_call=>"Cliff, Claire"
|
:args_call=>"Cliff, Claire"
|
||||||
@@ -1978,7 +1978,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
assert_equal(@parser.divine_ptr(entry[0]), entry[1])
|
assert_equal(@parser.divine_ptr(entry[0]), entry[1])
|
||||||
assert_equal(@parser.divine_const(entry[0]), entry[2])
|
assert_equal(@parser.divine_const(entry[0]), entry[2])
|
||||||
assert_equal(@parser.divine_ptr_and_const(entry[0]),
|
assert_equal(@parser.divine_ptr_and_const(entry[0]),
|
||||||
{ ptr?: entry[1], const?: entry[2], const_ptr?: entry[3] })
|
{ ptr?: entry[1], string?: false, const?: entry[2], const_ptr?: entry[3] })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -2345,8 +2345,8 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:class=>nil,
|
:class=>nil,
|
||||||
:modifier=>"",
|
:modifier=>"",
|
||||||
:contains_ptr? => false,
|
:contains_ptr? => false,
|
||||||
:args=>[ {:type=>"int", :name=>"Lenny", :ptr? => false, :const? => false, :const_ptr? => false},
|
:args=>[ {:type=>"int", :name=>"Lenny", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false},
|
||||||
{:type=>"int", :name=>"Squiggy", :ptr? => false, :const? => false, :const_ptr? => false}
|
{:type=>"int", :name=>"Squiggy", :ptr? => false, :string? => false, :const? => false, :const_ptr? => false}
|
||||||
],
|
],
|
||||||
:args_string=>"int Lenny, int Squiggy",
|
:args_string=>"int Lenny, int Squiggy",
|
||||||
:args_call=>"Lenny, Squiggy"
|
:args_call=>"Lenny, Squiggy"
|
||||||
@@ -2589,7 +2589,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:var_arg => nil,
|
:var_arg => nil,
|
||||||
:args_string => "int a",
|
:args_string => "int a",
|
||||||
:args => [
|
:args => [
|
||||||
{ :ptr? => false,
|
{ :ptr? => false, :string? => false,
|
||||||
:const? => false,
|
:const? => false,
|
||||||
:const_ptr? => false,
|
:const_ptr? => false,
|
||||||
:name => "a",
|
:name => "a",
|
||||||
@@ -2612,7 +2612,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:var_arg => nil,
|
:var_arg => nil,
|
||||||
:args_string => "int* a",
|
:args_string => "int* a",
|
||||||
:args => [
|
:args => [
|
||||||
{ :ptr? => true,
|
{ :ptr? => true, :string? => false,
|
||||||
:const? => false,
|
:const? => false,
|
||||||
:const_ptr? => false,
|
:const_ptr? => false,
|
||||||
:name => "a",
|
:name => "a",
|
||||||
@@ -2661,7 +2661,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:var_arg => nil,
|
:var_arg => nil,
|
||||||
:args_string => "int a",
|
:args_string => "int a",
|
||||||
:args => [
|
:args => [
|
||||||
{ :ptr? => false,
|
{ :ptr? => false, :string? => false,
|
||||||
:const? => false,
|
:const? => false,
|
||||||
:const_ptr? => false,
|
:const_ptr? => false,
|
||||||
:name => "a",
|
:name => "a",
|
||||||
@@ -2684,7 +2684,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
:var_arg => nil,
|
:var_arg => nil,
|
||||||
:args_string => "int* a",
|
:args_string => "int* a",
|
||||||
:args => [
|
:args => [
|
||||||
{ :ptr? => true,
|
{ :ptr? => true, :string? => false,
|
||||||
:const? => false,
|
:const? => false,
|
||||||
:const_ptr? => false,
|
:const_ptr? => false,
|
||||||
:name => "a",
|
:name => "a",
|
||||||
|
|||||||
Reference in New Issue
Block a user