summaryrefslogtreecommitdiff
path: root/jni/ruby/test/-ext-/st/test_foreach.rb
blob: 259b0a93b127ae6fa075179fb2f5f50892633ad1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'test/unit'
require '-test-/st/foreach'

class Test_StForeachUnpack < Test::Unit::TestCase
  def test_st_foreach_check_unpack
    assert_nil Bug.unp_st_foreach_check(:check), "goto unpacked_continue"
    assert_nil Bug.unp_st_foreach_check(:delete1), "goto unpacked"
    assert_nil Bug.unp_st_foreach_check(:delete2), "goto deleted"
  end

  def test_st_foreach_unpack
    assert_nil Bug.unp_st_foreach(:unpacked), "goto unpacked"
    assert_nil Bug.unp_st_foreach(:unpack_delete), "if (!ptr) return 0"
  end
end