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

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

#
Ruby | 30 lines | 17 code | 4 blank | 9 comment | 5 complexity | aa9e7596d48d5bf4f0d9d268165ff659 MD5 | raw file
 1#!/usr/bin/env ruby
 2#
 3# A simple std::stack test
 4#
 5# 
 6# 
 7# 
 8#
 9
10require 'swig_assert'
11
12require 'li_std_stack'
13include Li_std_stack
14
15swig_assert_each_line(<<'EOF', binding)
16a = IntStack.new
17a << 1
18a << 2
19a << 3
20a.top == 3
21a.pop
22a.top == 2
23a.pop
24a.top == 1
25a.pop
26a.size == 0
27a.empty? == true
28# a.top == Qnil
29
30EOF