PageRenderTime 40ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Ruby | 21 lines | 7 code | 6 blank | 8 comment | 4 complexity | 2219c1ff2e16cfe1b8a99b5a4de638e4 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #!/usr/bin/env ruby
  2. #
  3. # Put description here
  4. #
  5. #
  6. #
  7. #
  8. #
  9. require 'swig_assert'
  10. require 'struct_value'
  11. b = Struct_value::Bar.new
  12. b.a.x = 3
  13. raise RuntimeError if b.a.x != 3
  14. b.b.x = 3
  15. raise RuntimeError if b.b.x != 3