Skip to content

Commit

Permalink
Removed some more unused stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
pJunger committed Jun 2, 2017
1 parent bffbf5d commit 58cdc8c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 35 deletions.
7 changes: 1 addition & 6 deletions lib/Catch_4_Ceedling.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ class Catch4_Ceedling < Plugin

# Get the location of this plugin.
@@plugin_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
# @@main_location = "#{@@plugin_root}/src/catch_main_runner.c"

# Set up Ceedling to use this plugin.
def setup
TestIncludesExtractor.set_main_location(@@main_location)
copy_main()
Expand All @@ -27,7 +25,6 @@ def setup
def copy_main()
# Optimization: Create extra catch_main file to reduce compilation times
# Compile only once, it should be invariant
# (Otherwise it would take ages to compile)
unless File.file?(@@main_location)
FileUtils::mkdir_p(@@main_dir)
FileUtils.copy_file("#{@@plugin_root}/src/catch_main.cpp", @@main_location)
Expand All @@ -42,9 +39,7 @@ def pre_runner_generate(arg_hash)

# monkey patch
class TestIncludesExtractor
@@main_location = "#{PROJECT_ROOT}/build/test/main/catch_main.c"
# @@plugin_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
# @@main_location = "#{@@plugin_root}/src/catch_main_runner.c"
@@main_location = ""

def self.set_main_location(f_name)
@@main_location = f_name
Expand Down
29 changes: 0 additions & 29 deletions lib/catch_testrunner_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

# Monkey patch the original generator
class GeneratorTestRunner

# def initialize(options=nil)

# end

@@ceedling = nil
@@plugin_root = nil
Expand All @@ -29,12 +25,6 @@ def generate(input_file, output_file, tests, used_mocks, testfile_includes)

fff_is_enabled = PLUGINS_ENABLED.include?('fake_function_framework')

# mocks = if fff_is_enabled
# # only then the mocked functions are exported
# @@ceedling[:cmock_builder].cmock.get_mocked_functions
# else
# {}
# end
template_data = TestRunnerTemplateData.new(fff_is_enabled, used_mocks)


Expand All @@ -46,25 +36,6 @@ def generate(input_file, output_file, tests, used_mocks, testfile_includes)
File.open(output_file, 'w') do |f|
f.puts '/* AUTOGENERATED FILE, PLEASE DO NOT EDIT */'
f.puts renderer.result(template_data.get_binding)
# f.puts '/* Implement the mocking interface */'
# f.puts '#include "mock_interface.h"'
# f.puts ''
# used_mocks.each do |mock|
# f.puts "#include \"#{mock}.h\""
# end
# f.puts ''
# f.puts 'void init_mocks() {'
# used_mocks.each do |mock|
# f.puts " #{mock}_Init();"
# end
# f.puts '}'
# f.puts ''
# f.puts 'void destroy_mocks() {'
# used_mocks.each do |mock|
# f.puts " #{mock}_Init();"
# end
# f.puts '}'
# f.puts ''
end

end
Expand Down

0 comments on commit 58cdc8c

Please sign in to comment.