template class TestSuiteAdapter<typename S, typename D> : TestSuite

Creates test suites that use functors for fixture set-up and tear-down.

This template creates a test suite class that calls functors during set-up and tear-down of the test suite. Instead of instantiating the template directly, the convenience function makeTestSuite could be used:

template<typename S, typename D> inline TestSuiteAdapter<S,D>* makeTestSuite (
      const string& name,
      bool breakOnFailure,
      S setUpFunc,
      D tearDownFunc
);

template<typename S> inline TestSuiteAdapter<S,noop_type>* makeTestSuite (
      const string& name,
      bool breakOnFailure,
      S setUpFunc
);
 




Public Members:
    TestSuiteAdapter (const string name, bool breakOnFailure, S setUpFunc, D tearDownFunc ) ;
    Creates a new test suite adapter instance.
    Beside the name and the break-on-failure status, a functor for set-up (of type S) and tear-down (of type D) is needed. See TestSuite for the meaning of breakOnFailure.

    virtual void setUp () ;
    Test suite set-up.
    The set-up functor of type S is called.

    virtual void tearDown () ;
    Test suite tear-down.
    The tear-down functor of type D is called.




The Scrunitizer C++ Unit Test Framework
by Bernd Linowski

[Scrunitizer]  [Overview]  [Cookbook]  [Download]  [Index]  [Linosphere]

Page generated: 1 Nov 2000
(C) by Bernd Linowski
scrunitizer@linosphere.de