# Ruby Treasures 0.1
# Copyright (C) 2001 Paul Brannan <paul@atdesk.com>
# 
# You may distribute this software under the same terms as Ruby (see the file
# COPYING that was distributed with this library).
# 
require 'helpers'
require 'map'

N = 1000
STRING_LENGTH = 10

h = Hash.new
m = Map.new

N.times do
  key   = random_string(STRING_LENGTH)
  value = random_string(STRING_LENGTH)

  h[key] = value
  m[key] = value
end

assert h.size == m.size
h.each do |key, value|
  assert m[key] == value
end
m.each do |key, value|
  assert h[key] == value
end

