Sha256: 4c2eade1806b46515df9b09ec9c15b3323dce844bd2e20b938b73606413c9bb7

Contents?: true

Size: 943 Bytes

Versions: 34

Compression:

Stored size: 943 Bytes

Contents

require 'test/unit'
require 'fox16'
require 'testcase'

class TC_FXGLViewer < Fox::TestCase
  include Fox

  def setup
    super(self.class.name)
    vis = FXGLVisual.new(app, VISUAL_DOUBLEBUFFER)
    @viewer = FXGLViewer.new(mainWindow, vis)
  end

  def test_supported
    arr = FXGLVisual.supported(app)
    assert_equal 3, arr.length, "return array should have elements [support, major, minor]"
    assert_true arr[0], "OpenGL should be supported"
    assert_operator 1, :<=, arr[1], "OpenGL should be version 1.0 or greater"
  end

  def test_supported?
    assert_true FXGLVisual.supported?(app), "OpenGL should be supported"
  end

  def test_nil_app_raises_argument_error
    assert_raise(ArgumentError){ FXGLVisual.supported?(nil) }
  end

=begin
  def test_readPixels
    pixels = @viewer.readPixels(0, 0, @viewer.width, @viewer.height)
    assert(pixels)
    assert_equal(3*@viewer.width*@viewer.height, pixels.size)
  end
=end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
fxruby-1.6.48 test/TC_FXGLViewer.rb
fxruby-1.6.48-x64-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.48-x64-mingw-ucrt test/TC_FXGLViewer.rb
fxruby-1.6.48-x86-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.47 test/TC_FXGLViewer.rb
fxruby-1.6.47-x64-mingw-ucrt test/TC_FXGLViewer.rb
fxruby-1.6.47-x64-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.47-x86-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.46 test/TC_FXGLViewer.rb
fxruby-1.6.46-x64-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.46-x64-mingw-ucrt test/TC_FXGLViewer.rb
fxruby-1.6.46-x86-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.45 test/TC_FXGLViewer.rb
fxruby-1.6.45-x64-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.45-x64-mingw-ucrt test/TC_FXGLViewer.rb
fxruby-1.6.45-x86-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.44 test/TC_FXGLViewer.rb
fxruby-1.6.44-x64-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.44-x86-mingw32 test/TC_FXGLViewer.rb
fxruby-1.6.43 test/TC_FXGLViewer.rb