🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #568

how to test glyphs?

#568
From: Denis Bohm
Date: Tue, 01 Sep 1992 19:34
29 lines
1795 bytes
Has anyone tried setting up a testing framework for glyphs?  What I
would like to do is test each of the Glyph member functions for each
of the new glyphs that I have put together.

For example, if I have a glyph that is like an hbox, I would like to
something like:
  1) create some allocation test glyphs and placed them in the box
  2) call box request and assert that the result is as expected
  3) call box allocate and assert that the extension is as expected
  4) assert that the allocation test glyphs have the expected
     allocations
  5) create a clipping test canvas and call box draw
  6) assert that the clipping was set properly
  ... same for testing the other Glyph member functions

It seems like there could be a kit of generic testing objects
(containing Glyph, Canvas, Window, Event, etc. testing objects), and an
assertion kit (check that these two requisitions are close, etc.).  This
type of testing can be used for batch regression test runs because you
don't need a display to run the tests.

I have tried the event journal and replay type testing where you have to
create a window on the screen and manuall interact with it to create a
test.  I thought that it was fairly useless (it is such indirect way of
trying to test very specific behaviors).

Does anyone have any experience or opinions?
-- 
Denis Bohm (denis@redwood.com -or- denisb@leland.stanford.edu)
Technical Details
Message-ID: <1992Sep1.193435.9665@leland.Stanford.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!leland.Stanford.EDU!denisb

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!leland.Stanford.EDU!denisb
From: denisb@leland.Stanford.EDU (Denis Bohm)
Subject: how to test glyphs?
Message-ID: <1992Sep1.193435.9665@leland.Stanford.EDU>
Sender: news@leland.Stanford.EDU (Mr News)
Organization: DSG, Stanford University, CA 94305, USA
Date: Tue, 1 Sep 92 19:34:35 GMT
Lines: 29