[ruby-opengl-devel] Unit Tests

Al Hoang hoanga at alum.rpi.edu
Wed Jan 17 21:37:39 EST 2007

Hi all,

    I've been looking at the tests in the test/ directory and have been
wondering what these are for exactly.  They look like they are the beginning
of a suite of unit tests however I can't the tests that are in there now
to work correctly.  After poking around I'm noticing that the require is
incorrect and the reference of the module namespace also is incorrect.
I can fix these readily however these other problems are ones I need
some help on...

In the Examples:
    Can these tests be automated?  So far it seems that the tests will have
to open up a window of some sort and display something on the screen.  However
how does one evaluate the tests for this?  It'd be really nice if it's
possible but from where I'm looking this looks really hard.  perhaps an
alternate would be to package an image file (png or something) that shows
what the output of plane.rb and the other examples in order to make sure
that what you're seeing is what is expected.

    The assertion tests for a constant GL_VERSION_1_1 to have the value of
1.  Is this something that ruby-opengl should be adding into the Gl module?
I don't see it from a perusing of the constants in the Gl module.  If so,
what exactly is it for?   If this test is only trying to ensure that
the Gl module and namespace can be tested perhaps it'd be better to use
GL_VERSION and just test for its existence?

    I'm seeing the same GL_VERSION_1_1 existence test as above.  Shouldn't
we just test if require 'gl' works and that's it?

    There is nothing that allows something like require 'opengl' which
includes gl, glu, and glut.  Is this something that is still desired?  It
should be simple to do but I'm not sure if it's desired or not.  I wouldn't
mind having it, personally.


More information about the ruby-opengl-devel mailing list