1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

the test runner generator now has the ability to also output a header file for the tests, which can get pulled into the test itself if desired.

This commit is contained in:
Mark VanderVoord
2015-07-21 15:35:33 -04:00
parent ab7e322a04
commit a7b85335be
12 changed files with 214 additions and 25 deletions

View File

@@ -38,6 +38,20 @@ should "GenerateARunnerByCreatingRunnerWithOptions" do
end
end
should "GenerateARunnerAlongWithAHeaderIfSpecified" do
sets = { 'head1' => { :header_file => "#{OUT_FILE}head1.h" } }
sets.each_pair do |subtest, options|
UnityTestRunnerGenerator.new(options).run(TEST_FILE, OUT_FILE + subtest + '.c')
verify_output_equal(subtest)
end
sets = { 'head1' => { :header_file => "#{OUT_FILE}mock_head1.h" } }
sets.each_pair do |subtest, options|
UnityTestRunnerGenerator.new(options).run(TEST_MOCK, OUT_FILE + 'mock_' + subtest + '.c')
verify_output_equal('mock_' + subtest)
end
end
should "GenerateARunnerByRunningRunnerWithOptions" do
sets = { 'run1' => { :plugins => [:cexception], :includes => ['one.h', 'two.h'], :enforce_strict_ordering => true },
'run2' => { :plugins => [:ignore], :suite_setup => "a_custom_setup();", :suite_teardown => "a_custom_teardown();" }