PageRenderTime 38ms CodeModel.GetById 31ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Ruby | 26 lines | 11 code | 7 blank | 8 comment | 4 complexity | 3daf1b6eb0b2850e4fe48fe83674b9f7 MD5 | raw file
 1#!/usr/bin/env ruby
 2#
 3# Put description here
 4#
 5# 
 6# 
 7# 
 8#
 9
10require 'swig_assert'
11
12require 'smart_pointer_multi'
13
14include Smart_pointer_multi
15
16f = Foo.new
17b = Bar.new(f)
18s = Spam.new(b)
19g = Grok.new(b)
20
21s.x = 3
22raise RuntimeError if s.getx() != 3
23
24g.x = 4
25raise RuntimeError if g.getx() != 4
26
27