Click here to Skip to main content
15,881,248 members
Articles / Desktop Programming / ATL

Test Runner Application

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
2 Nov 2005 105.9K   1.7K   27  
A framework for performing unit tests.
#if !defined(_TESTSUITE_H)
#define _TESTSUITE_H

#if _MSC_VER > 100
#pragma once
#endif // _MSC_VER > 100

// 
//                Jerry Edens & Doug Eveland
//         Copyright(c) 1999 All Rights Reserved 
// 
// This code may be used in compiled form for non-profit
// purposes and the source code may be redistributed 
// unmodified by any means providing it is not sold for 
// profit, unless written consent is granted by the 
// authors, and providing that this notice and the 
// authors names are included.
//
// If you find any bugs or make any modifications please
// send them to me for incorporation into the code.
//
// This file is provided "as is" with out expressed or 
// implied warranty.
//
// Contact me if you have any questions, comments, or 
// bug reports at jerrye@home.com
//
// Description:
// 	
// 
// $Log: 
// $
// $Revision: $
// $Date: $
// Author: Jerry Edens
// 
// CTestSuite.h : Declaration of the CTestSuite

// Group = Core Classes

#include "resource.h"       // main symbols

/////////////////////////////////////////////////////////////////////////////
// Description:
//    Holds a set of ITestSuiteItems which compose a Test Suite
//
// Remarks:
//    Uses a ITestSuiteItemCollection for implementation of the collectin.
//
// Author:
// 	Jerry Edens
//
// Include:
//    #include "CTestSuite.h" 
// 
class ATL_NO_VTABLE CTestSuite : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CTestSuite, &CLSID_CTestSuite>,
	public ISupportErrorInfo,
	public IDispatchImpl<ITestSuite, &IID_ITestSuite, &LIBID_TESTCORELib>
{
public:
   
   // Group = TORS

	CTestSuite()
	{
	}

DECLARE_REGISTRY_RESOURCEID(IDR_CTESTSUITE)

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CTestSuite)
	COM_INTERFACE_ENTRY(ITestSuite)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(ISupportErrorInfo)
END_COM_MAP()

// ITestSuite
public:

   STDMETHOD(put_TestSuiteItems)(/*[in]*/ 
         ITestSuiteItemCollection* pITestSuiteItemCollection);

   STDMETHOD(get_TestSuiteItems)(/*[out, retval]*/ 
         ITestSuiteItemCollection** ppITestSuiteItemCollection);

// ISupportsErrorInfo
public:
	
   STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);

// CTestSuite
protected:

   CComPtr<ITestSuiteItemCollection> m_pTestSuiteItemCollection;
};




#endif // _TESTSUITE_H

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions