mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-09 03:39:57 +00:00
- removed leftovers of old global-order handling
git-svn-id: http://cmock.svn.sourceforge.net/svnroot/cmock/trunk@208 bf332499-1b4d-0410-844d-d2d48d5cc64c
This commit is contained in:
@@ -128,7 +128,6 @@ class CMockGenerator
|
||||
if (@ordered)
|
||||
file << "extern int GlobalExpectCount;\n"
|
||||
file << "extern int GlobalVerifyOrder;\n"
|
||||
file << "extern char* GlobalOrderError;\n"
|
||||
end
|
||||
file << "\n"
|
||||
end
|
||||
@@ -136,7 +135,6 @@ class CMockGenerator
|
||||
def create_mock_verify_function(file, functions)
|
||||
file << "void #{@mock_name}_Verify(void)\n{\n"
|
||||
verifications = functions.collect {|function| @plugins.run(:mock_verify, function)}.join
|
||||
verifications += " UNITY_TEST_ASSERT_NULL(GlobalOrderError, cmock_line, \"Internal CMock error.\");\n" if (@ordered)
|
||||
file << " UNITY_LINE_TYPE cmock_line = TEST_LINE_NUM;\n" unless verifications.empty?
|
||||
file << verifications
|
||||
file << "}\n\n"
|
||||
@@ -156,11 +154,6 @@ class CMockGenerator
|
||||
if (@ordered)
|
||||
file << " GlobalExpectCount = 0;\n"
|
||||
file << " GlobalVerifyOrder = 0;\n"
|
||||
file << " if (GlobalOrderError)\n"
|
||||
file << " {\n"
|
||||
file << " free(GlobalOrderError);\n"
|
||||
file << " GlobalOrderError = NULL;\n"
|
||||
file << " }\n"
|
||||
end
|
||||
file << "}\n\n"
|
||||
end
|
||||
|
||||
@@ -262,7 +262,6 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
expected = [ "extern jmp_buf AbortFrame;\n",
|
||||
"extern int GlobalExpectCount;\n",
|
||||
"extern int GlobalVerifyOrder;\n",
|
||||
"extern char* GlobalOrderError;\n",
|
||||
"\n" ]
|
||||
|
||||
@cmock_generator_strict.create_extern_declarations(output)
|
||||
@@ -290,8 +289,7 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
" Uno_First" +
|
||||
" Dos_First" +
|
||||
" Uno_Second" +
|
||||
" Dos_Second" +
|
||||
" UNITY_TEST_ASSERT_NULL(GlobalOrderError, cmock_line, \"Internal CMock error.\");\n",
|
||||
" Dos_Second",
|
||||
"}\n\n"
|
||||
]
|
||||
@plugins.expect.run(:mock_verify, functions[0]).returns([" Uno_First"," Dos_First"])
|
||||
@@ -340,11 +338,6 @@ class CMockGeneratorTest < Test::Unit::TestCase
|
||||
" uno",
|
||||
" GlobalExpectCount = 0;\n",
|
||||
" GlobalVerifyOrder = 0;\n",
|
||||
" if (GlobalOrderError)\n",
|
||||
" {\n",
|
||||
" free(GlobalOrderError);\n",
|
||||
" GlobalOrderError = NULL;\n",
|
||||
" }\n",
|
||||
"}\n\n"
|
||||
]
|
||||
@plugins.expect.run(:mock_destroy, functions[0]).returns([])
|
||||
|
||||
Reference in New Issue
Block a user