require "./test_encoding"


times = ( ( ARGV[0] and ARGV[0].to_i > 0 ) ? ARGV[0].to_i : 5000 )
Thread.abort_on_exception = true
threads = []


t=TestEncoding::Tester.new
tester = TestEncoding::Tester.new

times.times do |num|
  puts "iteration [#{num}]"
  puts tester.test_rb_str_new.inspect
  threads << Thread.new { }
end
threads.each {|t| t.join}

times.times do |num|
  puts "iteration [#{num}]"
  puts tester.test_rb_enc_str_new.inspect
  threads << Thread.new { }
end
threads.each {|t| t.join}

puts "OK"