PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/test-suite/ruby/li_std_multimap_runme.rb

#
Ruby | 27 lines | 14 code | 5 blank | 8 comment | 5 complexity | 5b5367ccb36a274083050322fd43e230 MD5 | raw file
 1#!/usr/bin/env ruby
 2#
 3# Tests for std::multimap
 4#
 5# 
 6# 
 7# 
 8#
 9
10require 'swig_assert'
11require 'li_std_multimap'
12
13swig_assert_each_line(<<'EOF', binding)
14
15a1 = Li_std_multimap::A.new(3)
16a2 = Li_std_multimap::A.new(7)
17
18m = Li_std_multimap::MultimapA.new
19m[0] = a1
20m[0] = a2
21m[0].size == 2
22m.respond_to?(:each) == true
23m.respond_to?(:each_key) == true
24m.respond_to?(:each_value) == true
25m.values_at(0)[0] == m[0]
26EOF
27