Sha256: 2f48ca2685bd602531ef629f471b111b04425e0a605be8b7ced826eab816feeb
Contents?: true
Size: 1.24 KB
Versions: 4
Compression:
Stored size: 1.24 KB
Contents
require 'helper' class TestImplementation < Test::Unit::TestCase context 'C++ implementation' do should 'initialize with information in a file' do gpp = Jeka::Compiler::Gpp.new([File.join(File.dirname(__FILE__), 'bubble_sort', 'cpp', 'bubble_sort.cpp')], {:o => 'bubble_sort_cpp'}) imp = Jeka::Implementation.new('c++') imp.information = File.join(File.dirname(__FILE__), 'bubble_sort', 'cpp', '_implementation.yaml') imp.compiler = gpp assert_equal 'c++', imp.name assert_equal 'c++', imp.information[:language] assert_equal 'Simple implementation in C++', imp.information[:comment] assert imp.compiler end should 'initialize with information in a hash' do gpp = Jeka::Compiler::Gpp.new([File.join(File.dirname(__FILE__), 'bubble_sort', 'cpp', 'bubble_sort.cpp')], {:o => 'bubble_sort_cpp'}) imp = Jeka::Implementation.new('c++') imp.information = {language: 'c++', comment: 'Simple implementation in C++'} imp.compiler = gpp assert_equal 'c++', imp.name assert_equal 'c++', imp.information[:language] assert_equal 'Simple implementation in C++', imp.information[:comment] assert imp.compiler end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
jeka-0.2.3 | test/test_implementation.rb |
jeka-0.2.2 | test/test_implementation.rb |
jeka-0.2.1 | test/test_implementation.rb |
jeka-0.2.0 | test/test_implementation.rb |