Sha256: f9844216071c84ceaf4a31ae6e42a6b4092e54642c18946a81a328c568bba8bd

Contents?: true

Size: 611 Bytes

Versions: 6

Compression:

Stored size: 611 Bytes

Contents

require 'test/unit'
require 'fox12'

include Fox

class TC_FXGLGroup < Test::Unit::TestCase
  def setup
    @group = FXGLGroup.new
  end

  def test_append
    assert_equal(0, @group.size)
    @group.append(FXGLObject.new)
    assert_equal(1, @group.size)
  end

  def test_appendOp
    assert_equal(0, @group.size)
    @group << FXGLObject.new
    assert_equal(1, @group.size)
  end
  
  def test_each_child_yields_to_block
    @group << FXGLObject.new
    @group << FXGLObject.new
    count = 0
    assert_nothing_raised {
      @group.each_child { |c| count += 1 }
    }
    assert_equal(2, count)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fxruby-1.2.3 tests/TC_FXGLGroup.rb
fxruby-1.2.2 tests/TC_FXGLGroup.rb
fxruby-1.2.4 tests/TC_FXGLGroup.rb
fxruby-1.2.5 tests/TC_FXGLGroup.rb
fxruby-1.2.6 tests/TC_FXGLGroup.rb
fxruby-1.4.0 tests/TC_FXGLGroup.rb