improve tests

This commit is contained in:
Torsten Ruger
2015-09-27 20:28:34 +03:00
parent 6e009cc6df
commit 259b0afa96
8 changed files with 83 additions and 83 deletions

View File

@ -2,6 +2,7 @@
require_relative "test_foo"
require_relative "test_if"
require_relative "test_hello"
require_relative "test_class"
require_relative "test_putint"
require_relative "test_functions"
require_relative "test_recursive_fibo"

View File

@ -0,0 +1,21 @@
require_relative 'helper'
class TestBasicClass < MiniTest::Test
include Fragments
def test_class_basic
@string_input = <<HERE
module Foo
class Bar
int buh()
return 1
end
end
end
HERE
@expect = [ Virtual::Return ]
check
end
end

View File

@ -5,6 +5,16 @@ class TestList < MiniTest::Test
def setup
@list = ::Parfait::List.new
end
def test_list_inspect
@list.set(1,1)
assert_equal "1" , @list.inspect
end
def test_list_equal
@list.set(1,1)
list = ::Parfait::List.new
list.set(1,1)
assert @list.equal? list
end
def test_list_create
assert @list.empty?
end