projects
/
external
/
swig.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
import source from 1.3.40
[external/swig.git]
/
Examples
/
test-suite
/
ruby
/
li_std_stack_runme.rb
1
#!/usr/bin/env ruby
2
#
3
# A simple std::stack test
4
#
5
#
6
#
7
#
8
#
9
10
require 'swig_assert'
11
12
require 'li_std_stack'
13
include Li_std_stack
14
15
swig_assert_each_line(<<'EOF', binding)
16
a = IntStack.new
17
a << 1
18
a << 2
19
a << 3
20
a.top == 3
21
a.pop
22
a.top == 2
23
a.pop
24
a.top == 1
25
a.pop
26
a.size == 0
27
a.empty? == true
28
# a.top == Qnil
29
30
EOF