fixed silly dictionary bug

also finally duplicating keys and values and not handing them out
This commit is contained in:
Torsten Ruger
2016-12-30 20:46:18 +02:00
parent a7935db107
commit ef66a87527
3 changed files with 27 additions and 16 deletions

View File

@ -60,11 +60,17 @@ class TestDictionary < MiniTest::Test
assert_equal v , shouldda[k]
end
end
def test_values
assert @lookup.values
@lookup[2] = 2
assert @lookup.values.get_length == 1
end
def test_keys
assert @lookup.keys
@lookup[2] = 2
assert @lookup.keys.get_length == 1
end
def test_override_exising
@lookup[2] = 2
@lookup[2] = :two
assert @lookup[2] == :two
end
end