require_relative "../transpiler.rb"
require "test/unit"
require_relative "sampleSnippets.rb"
class TranspilerTest < Test::Unit::TestCase
(@@languages_supported).each do |origin_language|
(@@languages_supported - [origin_language]).each do |destiny_language|
@@snippets.each do |scenario, code|
define_method("test_transpiling_from_#{origin_language}_to_#{destiny_language}_on_#{scenario}") do
expected_snippet = code[destiny_language]
snippet_transpiled= transpile(code: code[origin_language], from: origin_language, to: destiny_language)
assert_equal(expected_snippet, snippet_transpiled)
end
end
end
end
end