[qmtest] Specifying arguments in derived test classes

Mark Mitchell mark at codesourcery.com
Wed May 15 22:38:38 UTC 2002


> Can you detail how you planned the classes to indicate that arguments
> should  be comptued?

I'm sorry it took me so long to reply to this mail.

What I meant by a computed argument was one that was a function of other
arguments.  The important invariant is that derived classes have all of
the arguments of base classes -- and maybe more.  There's no reason,
however, that the derived classes shouldn't be able to compute some
of the base class attributes.  So:

  class X(Test):

    arguments = [ "x" ]

  class Y(X):

    arguments = [ "y" ]

Perhaps "x" can be computed from "y".  Then, there's no reason that
the creator of a Y test should have to specify a value for "x".  We
want to have a way to specify two things:

  1. That the test database, and the GUI, should not store or display
     the value for "x" when showing a Y test.

  2. That the value of y be gotten by computing x.

I haven't figured out yet what the cleanest way to do that in the
code is.

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com




More information about the qmtest mailing list