Menu

About TestFixture

roger yu
2009-05-18
2013-04-22
  • roger yu

    roger yu - 2009-05-18

    When I build a test suite, I need to do something which is only done once in the test suite. I know in NUnit, there is a testFixtureSetUp() method which will do such job. Does cppunit provide similar methods? My cppunit version is 1.12.1. Thanks.

    Roger

     
    • housemaister

      housemaister - 2009-05-19

      No cppunit does not provide this.

      There are several ways to work around this; you could call a fixture setup method in the SetUp() method depending on a static variable which is then set by this method. In that way this method would only be called once.
      However for a Fixture TearDown method I do not know any work arounds - except for using another framework.

      Stefan.

       

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.