PageRenderTime 27ms CodeModel.GetById 17ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Ruby | 26 lines | 11 code | 7 blank | 8 comment | 8 complexity | c76475a381b1677da54d41932dd5c0fa MD5 | raw file
 1#!/usr/bin/env ruby
 2#
 3# Put description here
 4#
 5# 
 6# 
 7# 
 8#
 9
10require 'swig_assert'
11
12require 'template_ns'
13
14include Template_ns
15
16p1 = Pairii.new(2, 3)
17p2 = Pairii.new(p1)
18
19raise RuntimeError if p2.first != 2
20raise RuntimeError if p2.second != 3
21
22p3 = Pairdd.new(3.5, 2.5)
23p4 = Pairdd.new(p3)
24
25raise RuntimeError if p4.first != 3.5
26raise RuntimeError if p4.second != 2.5
27