PageRenderTime 34ms CodeModel.GetById 0ms RepoModel.GetById 0ms 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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #!/usr/bin/env ruby
  2. #
  3. # Tests for std::multimap
  4. #
  5. #
  6. #
  7. #
  8. #
  9. require 'swig_assert'
  10. require 'li_std_multimap'
  11. swig_assert_each_line(<<'EOF', binding)
  12. a1 = Li_std_multimap::A.new(3)
  13. a2 = Li_std_multimap::A.new(7)
  14. m = Li_std_multimap::MultimapA.new
  15. m[0] = a1
  16. m[0] = a2
  17. m[0].size == 2
  18. m.respond_to?(:each) == true
  19. m.respond_to?(:each_key) == true
  20. m.respond_to?(:each_value) == true
  21. m.values_at(0)[0] == m[0]
  22. EOF