⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testpluginrunnermodel.cpp

📁 C++中的单元测试类库
💻 CPP
字号:
// //////////////////////////////////////////////////////////////////////////// Implementation file TestPlugInRunnerModel.cpp for class TestPlugInRunnerModel// (c)Copyright 2000, Baptiste Lepilleur.// Created: 2001/06/24// //////////////////////////////////////////////////////////////////////////#include "StdAfx.h"#include "TestPlugInRunnerModel.h"#include <cppunit/TestSuite.h>#include "TestPlugIn.h"#ifdef _DEBUG#define new DEBUG_NEW#undef THIS_FILEstatic char THIS_FILE[] = __FILE__;#endifTestPlugInRunnerModel::TestPlugInRunnerModel() :     TestRunnerModel( new CPPUNIT_NS::TestSuite( "Default" ) ),    m_plugIn( new TestPlugIn( "default plug-in" ) ){}TestPlugInRunnerModel::~TestPlugInRunnerModel(){  freeRootTest();  delete m_plugIn;}void TestPlugInRunnerModel::setPlugIn( TestPlugIn *plugIn ){  freeRootTest();  delete m_plugIn;  m_plugIn = plugIn;  reloadPlugIn();}void TestPlugInRunnerModel::reloadPlugIn(){  try   {    CWaitCursor waitCursor;    m_history.clear();    freeRootTest();    setRootTest( m_plugIn->makeTest() );    loadHistory();  }  catch (...)  {    setRootTest( new CPPUNIT_NS::TestSuite( "Default" ) );      loadHistory();    throw;  }}void TestPlugInRunnerModel::freeRootTest(){  delete m_rootTest;  m_rootTest = 0;}void TestPlugInRunnerModel::setRootTest( CPPUNIT_NS::Test *rootTest ){  freeRootTest();  TestRunnerModel::setRootTest( rootTest );}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -