Menu

Changes in the object of class to be tested

ritesh
2002-12-23
2003-08-04
  • ritesh

    ritesh - 2002-12-23

    If I make some changes in the Object in one test method. Does the scope of that change will remain in the that method only or can i use that change in the another test method.

    Because i find this while I was testing some method of STL Vector. In one method other then setUp, I had resized one object. and used the same object with incresed size. But size it was showing to me was declared in the setUp.

    In what sequence test method are invoked.

    - Regards

    Ritesh

     
    • Dag Blakstad

      Dag Blakstad - 2003-01-06

      This is the intention of the setUp() method; to provide a clean environment for each test method. If you really want an object with preserved state between test methods, you should declare it as a member variable of the test class.

      Best Regards
      Dag

       
    • Nikhil Satankar

      Nikhil Satankar - 2003-08-04

      Need help for executing test case with different data. We are using cpp unit Framework for developing a Test Jig for testing Software tools .
      In put
      1. Different test data  for the Same method is passed in an Xml File
      2. We Need to  pass differet test data for the Same Method to be tested.
      Question
         How can I execute same test case with different data using  cppUnit framework.
      (  If I have to Use RepeatedTest class how can I use it by using Help Macros ??...)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.