Menu ▾ ▴

#11 Improved error detection in generated test stubs.

None
closed
Generation (37)
5
2012-09-26
2005-07-16
Mark Gawler
No

It can be difficult to spot when the an typo is made in
the name of a stubbed subprogram.

With Set_Value / Get_value it is reasonably obvious as
a STUBS.NO_VALUE exception is raised, although this can
be tedious to track down. With Number_Of_Calls there is
no indication except zero is always returned, which if
your testing for zero calls you wont spot!

Discussion

  • Simon Wright

    Simon Wright - 2005-07-16

    Logged In: YES
    user_id=917025

    This seems like an excellent plan!

     
  • Simon Wright

    Simon Wright - 2005-07-17

    Logged In: YES
    user_id=917025

    Logged as CF bug 0321.

     
  • Simon Wright

    Simon Wright - 2005-07-27

    Logged In: YES
    user_id=917025

    Logged as CF bug 0321.

     
  • Simon Wright

    Simon Wright - 2005-08-06

    Logged In: YES
    user_id=917025

    It would also be a good idea to check for accidental overriding of an
    already-set value; (eg, if the setup says the first call should return 42 and
    you alter this in the test procedure). The present code does the wrong
    thing; it ignores the problem and uses the previous value!

     
  • Simon Wright

    Simon Wright - 2012-09-26
    • labels: --> Generation
    • milestone: -->
     

Log in to post a comment.