add next_value for dictionary

also next for list
and add types attributes to space
This commit is contained in:
Torsten Ruger
2018-05-13 13:03:04 +03:00
parent 2d901bf7b6
commit 7ad36380c2
6 changed files with 53 additions and 2 deletions

View File

@ -198,4 +198,22 @@ module Parfait
assert_nil @list.last
end
end
class TestListContains < ParfaitTest
def setup
super
@list = ::Parfait::List.new
@list.push :one
@list.push :two
end
def test_next_value_ok
assert_equal :two , @list.next_value(:one)
end
def test_next_value_end
assert_nil @list.next_value(:two)
end
def test_next_value_not_int
assert_nil @list.next_value(:three)
end
end
end