diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-04-13 04:01:32 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-04-13 04:01:32 +0200 |
commit | 6456f18a9aa00cbf9d90075786122075dc8f3141 (patch) | |
tree | 1dc7cb4fcd74a9f6e34928fe138af10f3ef9b4b8 /contrib | |
parent | dad270be0b9b1d10b2aeb8960603a06677b75b2b (diff) |
remove more msvc specific code and bc5 stuff
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/bc5/bcc-makefile.zip | bin | 4359 -> 0 bytes | |||
-rw-r--r-- | contrib/msvc/AddingUnitTestMethod.dsm | 170 | ||||
-rw-r--r-- | contrib/msvc/CppUnit.WWTpl | 486 | ||||
-rw-r--r-- | contrib/msvc/CppUnitDev.WWTpl | 488 | ||||
-rw-r--r-- | contrib/msvc/UnitTestAddIn.zip | bin | 50005 -> 0 bytes | |||
-rw-r--r-- | contrib/msvc/readme.txt | 10 | ||||
-rw-r--r-- | contrib/readme.txt | 18 |
7 files changed, 1 insertions, 1171 deletions
diff --git a/contrib/bc5/bcc-makefile.zip b/contrib/bc5/bcc-makefile.zip Binary files differdeleted file mode 100644 index 8be8d7b..0000000 --- a/contrib/bc5/bcc-makefile.zip +++ /dev/null diff --git a/contrib/msvc/AddingUnitTestMethod.dsm b/contrib/msvc/AddingUnitTestMethod.dsm deleted file mode 100644 index c95ba5a..0000000 --- a/contrib/msvc/AddingUnitTestMethod.dsm +++ /dev/null @@ -1,170 +0,0 @@ -'Made by bloodchen -'bloodchen@hotmail.com -Sub NewTestClass -On Error Resume Next -dim proj_path,ext,pos,proj_dir,MyCppFile,MyCppName,MyHFile,MyHName,ClassName,HText,CPPText -proj_path = ActiveProject.fullname -ext = "" -pos = len (proj_path) -Do While ext <> "\" -ext = Mid(proj_path, pos, 1) -pos = pos -1 -Loop -proj_dir = left(proj_path, pos+1) -ClassName=InputBox("Enter the class name:", "Class Name") -if ActiveProject.Type <> "Build" then -MsgBox "This project is not valid. Ending macro." -Exit Sub -end if -if (len(ClassName) <= 0) then -MsgBox "Invalid class name. Ending macro." -Exit Sub -end if - -' ClassName="CTest" -MyCppName=proj_dir+ClassName+".cpp" -MyHName=proj_dir+ClassName+".h" -ActiveProject.AddFile MyCppName -ActiveProject.AddFile MyHName -Documents.Add "Text" -ActiveDocument.Selection.StartOfDocument - -HText= "#ifndef "+ClassName+"DEF"+VbCrLf& _ -"#define "+ClassName+"DEF"+VbCrLf& _ -""+VbCrLf& _ -"#include <cppunit\testcase.h>"+VbCrLf& _ -"#include <cppunit\extensions\HelperMacros.h>"+VbCrLf& _ -"class "+ClassName+":public CppUnit::TestCase"+VbCrLf& _ -"{"+VbCrLf& _ -" CPPUNIT_TEST_SUITE( "+ClassName+" );"+VbCrLf& _ -" CPPUNIT_TEST_SUITE_END();"+VbCrLf& _ -"public:"+VbCrLf& _ -" "+ClassName+"();"+VbCrLf& _ -" virtual ~"+ClassName+"();"+VbCrLf& _ -"};"+VbCrLf& _ -"#endif"+VbCrLf -ActiveDocument.Selection = HText -ActiveDocument.Save MyHName -' WriteFile MyHName,HText -Documents.Add "Text" -ActiveDocument.Selection.StartOfDocument -CPPText = "#include "+chr(34)+"stdafx.h"+chr(34)+VbCrLf& _ -"#include "+chr(34)+ClassName+".h"+chr(34)+VbCrLf& _ -""+VbCrLf& _ -""+VbCrLf& _ -"CPPUNIT_TEST_SUITE_REGISTRATION( "+ClassName+ " );"+VbCrLf& _ -""+VbCrLf& _ -""+VbCrLf& _ -ClassName+"::"+ClassName+"()"+VbCrLf& _ -"{"+VbCrLf& _ -"}"+VbCrLf& _ -""+VbCrLf& _ -""+VbCrLf& _ -ClassName+"::~"+ClassName+"()"+VbCrLf& _ -"{"+VbCrLf& _ -"}" -' WriteFile MyCppName,CPPText -ActiveDocument.Selection = CPPText -ActiveDocument.Save MyCppName - -End Sub - - -Sub ToggleHandCPP() -'DESCRIPTION: Opens the .cpp or .h file for the current document. -'Toggles between the .cpp & .h file -ext = ActiveDocument.FullName -If ext = "" Then -msgbox ("Error, not a .cpp or .h file") -exit sub -End If -DocName = UCase(ext) - -If Right(DocName,4) = ".CPP" Then -fn = left(DocName, Len(DocName)-3) & "h" -ElseIf Right(DocName,2) = ".H" Then -fn = Left(DocName, Len(DocName)-1) & "cpp" -Else -msgbox ("Error, not a .cpp or a .h file") -exit sub -End If -'msgbox (fn) -on error resume next -Documents.Open (fn) -End Sub - -Sub ADDTestMethod() -strHpt = ActiveDocument.FullName -if right(strHpt,3) = "CPP" Or right (strHpt,3) = "cpp" Then -ActiveDocument.Selection.SelectLine -strText = ActiveDocument.Selection.Text -if (Instr(strText, "::" ) = 0) Then -MsgBox("Line not valid !!") -Exit Sub -End If -else exit sub -end if - -pos = Instr(strText, "::") -strName = Right(strText, (Len(strText) - (pos+1))) -pos = Instr(strName,"(") -strName = Left(strName,pos-1) -strClass = Left(strText,pos - 1) -while (instr(strClass, " ") > 0) -pos = instr(strClass, " ") -strTyp = strTyp & Left(strClass, pos) -strClass = Right(strClass, Len(strClass) - (pos) ) -wend -ToggleHandCPP - -ActiveDocument.Selection.SelectAll -strHead = ActiveDocument.Selection.Text - -if (instr(strHead,strClass) = 0) Then -MsgBox(" Can't find class " & strClass & " !!") -ToggleHandCPP -Exit Sub -End If -ActiveDocument.Selection.EndOfDocument -lineBottom = ActiveDocument.Selection.CurrentLine - -ActiveDocument.Selection.StartOfDocument -ActiveDocument.Selection.StartOfLine -ActiveDocument.Selection.SelectLine -strLine = ActiveDocument.Selection.Text -while (instr(strLine, strName) = 0 And ActiveDocument.Selection.CurrentLine <> lineBottom) -ActiveDocument.Selection.StartOfLine -ActiveDocument.Selection.LineDown dsMove -ActiveDocument.Selection.SelectLine -strLine = ActiveDocument.Selection.Text -Wend -if (ActiveDocument.Selection.CurrentLine < lineBottom) Then -if( instr(strLine, "CPPUNIT_TEST" ) <> 0 )Then -ToggleHandCPP -Exit Sub -end if -End If - -ActiveDocument.Selection.StartOfDocument -ActiveDocument.Selection.StartOfLine -ActiveDocument.Selection.SelectLine -strLine = ActiveDocument.Selection.Text -while (instr(strLine, " CPPUNIT_TEST_SUITE_END();" ) = 0 And ActiveDocument.Selection.CurrentLine <> lineBottom) -ActiveDocument.Selection.StartOfLine -ActiveDocument.Selection.LineDown dsMove -ActiveDocument.Selection.SelectLine -strLine = ActiveDocument.Selection.Text -Wend -if (ActiveDocument.Selection.CurrentLine < lineBottom) Then -ActiveDocument.Selection.EndOfLine -ActiveDocument.Selection.LineUp -ActiveDocument.Selection.EndOfLine -ActiveDocument.Selection.NewLine -ActiveDocument.Selection = "CPPUNIT_TEST( "&strName&" );" -else -MsgBox("CPPUNIT_TEST_SUITE_END not found") -end if -ToggleHandCPP - -End Sub -
\ No newline at end of file diff --git a/contrib/msvc/CppUnit.WWTpl b/contrib/msvc/CppUnit.WWTpl deleted file mode 100644 index fbdf748..0000000 --- a/contrib/msvc/CppUnit.WWTpl +++ /dev/null @@ -1,486 +0,0 @@ -Baptiste Lepilleur's template file. -(@)Copyright 2001, Baptiste Lepilleur <gaiacrtn@free.fr>. - - - -[-ExtractPath] -!!Memo -Extract the path from a full filename. -path is the filename we need to extract the path from. -returns: extracted path. -Algo: we iterates the filename from the end until we found a character '\'. -!!End - -!!Params -path @@(ProjectPath)@@ -!!End - -!!Code -Input path: "@@path@@" -!!Set index @@(Strlen @@path@@)@@ -!!// -!!Set finalpath -!!Label LoopExtractPath -!!Sub index 1 -!!If @@index@@ < 0 -!!Goto EndExtractPath -!!Endif -!!// -!!Set lastchar @@(StrSub @@path@@ @@index@@ 1)@@ -!!If @@lastchar@@ != "\" -!!Goto LoopExtractPath -!!Endif -!!// -!!Add index 1 -!!Set finalpath @@(StrSub @@path@@ 0 @@index@@)@@ -!!// -!!Label EndExtractPath -!!Return @@finalpath@@ -!!End - - - ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- -[+01 Create Class in file] -!!Memo -Creates a new class in new files (.h/.cpp) and adds them to the project. -!!End - -!!Params -classname Ttr -parentclassname = -classdesc This class represents -objectkind Reference Object -hasserialize 0 -isrefobj 0 -inlinectordtor 0 -createfile 1 -isunittest 0 -!!End - -!!Dialog -<html><body> -Class name: <input type=text id=classname size=40><br> -Brief description: <input type=text id=classdesc size=68><br> -Object Kind: - <select name="Object Kind" id=objectkind> - <option>Default Value Object</option> - <option>Explicit Value Object</option> - <option>Reference Object</option> - </select><br> - -Parent class name: <input type=text id=parentclassname size=40><br> - -<input type=checkbox id=createfile> - Create a new file ? (otherwise Insert in current file).<br> -<br> -<input type=checkbox id=hasserialize> - Has: virtual void Serialize( CArchive &ar )<br> -<input type=checkbox id=isrefobj> - Is a reference counted object (inherit ERefObj)<br> -<input type=checkbox id=inlinectordtor> - Inline ctor/dtor, copy ctor/operator.<br> -<input type=checkbox id=isunittest> - Is a CppUnit unit test.<br> - -<!--Base filename: <input type=text id=classbasepath size=64><br> --> - - -<!--<p>Filename: <input type=file id=classhfn accept="*.h" size=40></p> --> -<!--<p>Filename: <input type=file id=classcppfn accept="*.h" size=40></p> --> -</body></html> -!!End - -!!Code -!!// Set variable that indicates the kind of object we are working on. -!!Set defvalobject 0 -!!If @@objectkind@@ == "Default Value Object" -!!Set defvalobject 1 -!!Endif -!!// -!!Set valobject 0 -!!If @@objectkind@@ == "Explicit Value Object" -!!Set valobject 1 -!!Endif -!!// -!!Set refobject 0 -!!If @@objectkind@@ == "Reference Object" -!!Set refobject 1 -!!Endif -!!// -!!// Set class filename (relative to dsp) -!!Set headerfn @@classname@@.h -!!Set implfn @@classname@@.cpp -!!Set headerdefine @@(String @@(Call -MakeHeaderDefined fn @@headerfn@@)@@:U)@@ -!!// -!!// hasparentclass indicates if a parent class has been defined. -!!Set hasparentclass 0 -!!If @@parentclassname@@ != = -!!Set hasparentclass 1 -!!Else -!!If @@isunittest@@ -!!Set parentclassname CppUnit::TestFixture -!!Set hasparentclass 1 -!!Endif -!!Endif -!!// -!!// hasparent is set to 1 if the class has some parent (ERefObj or parentclass). -!!Set hasparent @@hasparentclass@@ -!!If @@isrefobj@@ -!!Set hasparent 1 -!!Endif -!!// -!!// -!!// All variables are set, we can now generates the class. -!!// -!!// -!!// -!!// -!!// ---------------------------------------------------------------------------- -!!// ------------------------------ header file --------------------------------- -!!// ---------------------------------------------------------------------------- -!!// -!!// -!!// -!!If @@createfile@@ -!!FileNew @@headerfn@@ dsp -!!Set headerpath @@(FilePath)@@ -// ////////////////////////////////////////////////////////////////////////// -// Header file @@headerfn@@ for class @@classname@@ -// (c)Copyright 2000, Baptiste Lepilleur. -// Created: @@(Date "yyyy/MM/dd")@@ -// ////////////////////////////////////////////////////////////////////////// -#ifndef @@headerdefine@@ -#define @@headerdefine@@ -!!Else -// ////////////////////////////////////////////////////////////////////////// -// ////////////////////////////////////////////////////////////////////////// -// Definition of class @@classname@@ -// ////////////////////////////////////////////////////////////////////////// -// ////////////////////////////////////////////////////////////////////////// -!!Endif -!!If @@hasparentclass@@ - -!!If @@isunittest@@ -#include <cppunit/extensions/HelperMacros.h> -!!Else -#include "@@parentclassname@@.h" -!!Endif -!!Endif - - -!!If @@isrefobj@@ -/*! Declare @@classname@@Ref as a reference pointer on @@classname@@. - */ -EDECL_REF( @@classname@@ ); - - - -!!Endif -/*! \class @@classname@@ - * \brief @@classdesc@@ - */ -class @@classname@@@@\ -!!// Write inherited class list (parent class first, then ERefObj if inherited). -!!If @@hasparent@@ - : @@\ -!!// xpos contains the indentation level for inheritance declarations... -!!GetPos xpos ypos -!!Sub xpos 1 -public @@\ -!!Else - -!!Endif -!!If @@hasparentclass@@ -@@parentclassname@@@@\ -!!If @@isrefobj@@ -, -@@(Call -MakeFiller filler " " count @@xpos@@)@@@@\ -public @@\ -!!Else - -!!Endif -!!Endif -!!If @@isrefobj@@ -ERefObj -!!Endif -{ -!!// -!!// -!!// ------------ Done with inheritance, declare the class body... ---------- -!!// -!!// -!!If @@isunittest@@ - CPPUNIT_TEST_SUITE( @@classname@@ ); - CPPUNIT_TEST( putTestMethodNameHere ); - CPPUNIT_TEST_SUITE_END(); - -!!Endif -public: -!!If !@@defvalobject@@ - /*! Constructs a @@classname@@ object. - */ - @@classname@@(); - -!!Endif -!!If @@valobject@@ - /*! Copy constructor. - * @param copy Object to copy. - */ - @@classname@@( const @@classname@@ © ); - -!!Endif - /// Destructor. - virtual ~@@classname@@(); -!!If @@valobject@@ - - /*! Copy operator. - * @param copy Object to copy. - * @return Reference on this object. - */ - @@classname@@ &operator =( const @@classname@@ © ); -!!Endif -!!If @@isunittest@@ - - void setUp(); - void tearDown(); -!!Endif -!!// Private for methods -!!If @@refobject@@ - -private: - /// Prevents the use of the copy constructor. - @@classname@@( const @@classname@@ © ); - - /// Prevents the use of the copy operator. - void operator =( const @@classname@@ © ); -!!Endif -!!// Private for member datas - -private: -}; - - - -!!If @@createfile@@ -// Inlines methods for @@classname@@:@@\ -!!GetPos xpos ypos -!!Sub xpos 4 - -// @@(Call -MakeFiller filler - count @@xpos@@)@@ -!!Endif //@@createfile@@ -!!If @@inlinectordtor@@ -!!If !@@defvalobject@@ - - -inline -@@classname@@::@@classname@@()@@\ -!!If @@hasparentclass@@ - : - @@parentclassname@@() -!!Else - -!!Endif -{ -} -!!Endif //!@@defvalobject@@ -!!If @@valobject@@ - - -inline -@@classname@@::@@classname@@( const @@classname@@ © )@@\ -!!If @@hasparentclass@@ - : - @@parentclassname@@( copy ) -!!Else - -!!Endif -!!Endif //@@valobject@@ - - -inline -@@classname@@::~@@classname@@() -{ -} -!!If @@valobject@@ - - -inline @@classname@@ & -@@classname@@::operator =( const @@classname@@ © ) -{ - - return *this; -} -!!Endif //@@valobject@@ -!!Endif //@@inlinectordtor@@ - - -!!If @@createfile@@ - -#endif // @@headerdefine@@ -!!FileSave -!!ProjectFileAdd -!!Endif -!!// -!!// -!!// -!!// ---------------------------------------------------------------------------- -!!// -------------------------- Implementation file ----------------------------- -!!// ---------------------------------------------------------------------------- -!!// -!!// -!!// -!!If @@createfile@@ -!!FileNew @@implfn@@ dsp -// ////////////////////////////////////////////////////////////////////////// -// Implementation file @@implfn@@ for class @@classname@@ -// (c)Copyright 2000, Baptiste Lepilleur. -// Created: @@(Date "yyyy/MM/dd")@@ -// ////////////////////////////////////////////////////////////////////////// - -#include "StdAfx.h" -#include "@@headerfn@@" -!!Else - - -// ////////////////////////////////////////////////////////////////////////// -// Implementation of class @@classname@@ -// ////////////////////////////////////////////////////////////////////////// -!!Endif -!!If @@isunittest@@ - -CPPUNIT_TEST_SUITE_REGISTRATION( @@classname@@ ); -!!Endif -!!If !@@inlinectordtor@@ -!!If !@@defvalobject@@ - - -@@classname@@::@@classname@@()@@\ -!!If @@hasparentclass@@ - : - @@parentclassname@@() -!!Else - -!!Endif -{ -} -!!Endif -!!If @@valobject@@ - - -@@classname@@::@@classname@@( const @@classname@@ © )@@\ -!!If @@hasparentclass@@ - : - @@parentclassname@@( copy ) -!!Else - -!!Endif -{ -} -!!Endif - - -@@classname@@::~@@classname@@() -{ -} -!!If @@valobject@@ - - -@@classname@@ & -@@classname@@::operator =( const @@classname@@ © ) -{ - - return *this; -} -!!Endif -!!Endif -!!If @@isunittest@@ - - -void -@@classname@@::setUp() -{ -} - - -void -@@classname@@::tearDown() -{ -} -!!Endif - -!!If @@createfile@@ -!!FileSave -!!ProjectFileAdd -!!//ExecuteCommand FileOpen "@@headerpath@@" -!!Endif -!!End - ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- -[-Dummy] -!!Code -!!End - ---------------------------------------------------------------------------------- ------------------------- [-MakeHeaderDefined] ------------------------------- ---------------------------------------------------------------------------------- -[-MakeHeaderDefined] -!!Memo -This template replace all occurences of '.' in the specified filename "fn" by '_'. -This is typically used to make the #ifndef at the beginning of header files. -Parameters: "fn" filename in which each occurence of '.' is replaced by '_'. -Returns: Transformed filename. -!!End - -!!Params -fn TestDoIt -!!End - -!!Code -!!Set result @@fn@@ -!!Label LoopMakeHeaderDefined -!!Set fn @@result@@ -!!// Check if there is any occurence left of '.' -!!Set index @@(StrFind @@fn@@ ".")@@ -!!If @@index@@ < 0 -!!Goto EndMakeHeaderDefined -!!Endif -!!// Replace occurences of '.' in fb by '_' and set to result. -!!Set result @@(StrSub @@fn@@ 0 @@index@@ )@@_ -!!Add index 1 -!!Set result @@result@@@@(StrSub @@fn@@ @@index@@)@@ -!!Goto LoopMakeHeaderDefined -!!Label EndMakeHeaderDefined -!!Return @@result@@ -!!End - ---------------------------------------------------------------------------------- ----------------------------- [-MakeFiller] ---------------------------------- ---------------------------------------------------------------------------------- -[-MakeFiller] -!!Memo -Make a string that contains "count" occurrence of "filler". -Parameters: "filler" String that is repeated. - "count" Number of times the "filler" is repeated. -Returns: A string that contains "count" times the string "filler". -!!End - -!!Params -filler - -count 10 -!!End - -!!Code -!!Set result -!!Label LoopMakerFiller -!!If @@count@@ > 0 -!!Set result @@result@@@@filler@@ -!!Sub count 1 -!!Goto LoopMakerFiller -!!Endif -!!Return @@result@@ -!!End
\ No newline at end of file diff --git a/contrib/msvc/CppUnitDev.WWTpl b/contrib/msvc/CppUnitDev.WWTpl deleted file mode 100644 index 94ae9da..0000000 --- a/contrib/msvc/CppUnitDev.WWTpl +++ /dev/null @@ -1,488 +0,0 @@ -Baptiste Lepilleur's template file for CppUnit Development. -(@)Copyright 2001, Baptiste Lepilleur. - - - -[-ExtractPath] -!!Memo -Extract the path from a full filename. -path is the filename we need to extract the path from. -returns: extracted path. -Algo: we iterates the filename from the end until we found a character '\'. -!!End - -!!Params -path @@(ProjectPath)@@ -!!End - -!!Code -Input path: "@@path@@" -!!Set index @@(Strlen @@path@@)@@ -!!// -!!Set finalpath -!!Label LoopExtractPath -!!Sub index 1 -!!If @@index@@ < 0 -!!Goto EndExtractPath -!!Endif -!!// -!!Set lastchar @@(StrSub @@path@@ @@index@@ 1)@@ -!!If @@lastchar@@ != "\" -!!Goto LoopExtractPath -!!Endif -!!// -!!Add index 1 -!!Set finalpath @@(StrSub @@path@@ 0 @@index@@)@@ -!!// -!!Label EndExtractPath -!!Return @@finalpath@@ -!!End - - - ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- -[+01 Create Class in file] -!!Memo -Creates a new class in new files (.h/.cpp) and adds them to the project. -!!End - -!!Params -classname Ttr -parentclassname = -classdesc This class represents -objectkind Reference Object -hasserialize 0 -isrefobj 0 -inlinectordtor 0 -createfile 1 -isunittest 0 -!!End - -!!Dialog -<html><body> -Class name: <input type=text id=classname size=40><br> -Brief description: <input type=text id=classdesc size=68><br> -Object Kind: - <select name="Object Kind" id=objectkind> - <option>Default Value Object</option> - <option>Explicit Value Object</option> - <option>Reference Object</option> - </select><br> - -Parent class name: <input type=text id=parentclassname size=40><br> - -<input type=checkbox id=createfile> - Create a new file ? (otherwise Insert in current file).<br> -<br> -<input type=checkbox id=hasserialize> - Has: virtual void Serialize( CArchive &ar )<br> -<input type=checkbox id=isrefobj> - Is a reference counted object (inherit ERefObj)<br> -<input type=checkbox id=inlinectordtor> - Inline ctor/dtor, copy ctor/operator.<br> -<input type=checkbox id=isunittest> - Is a CppUnit unit test.<br> - -<!--Base filename: <input type=text id=classbasepath size=64><br> --> - - -<!--<p>Filename: <input type=file id=classhfn accept="*.h" size=40></p> --> -<!--<p>Filename: <input type=file id=classcppfn accept="*.h" size=40></p> --> -</body></html> -!!End - -!!Code -!!// Set variable that indicates the kind of object we are working on. -!!Set defvalobject 0 -!!If @@objectkind@@ == "Default Value Object" -!!Set defvalobject 1 -!!Endif -!!// -!!Set valobject 0 -!!If @@objectkind@@ == "Explicit Value Object" -!!Set valobject 1 -!!Endif -!!// -!!Set refobject 0 -!!If @@objectkind@@ == "Reference Object" -!!Set refobject 1 -!!Endif -!!// -!!// Set class filename (relative to dsp) -!!Set headerfn ../../include/cppunit/@@classname@@.h -!!Set implfn @@classname@@.cpp -!!Set headerdefine @@(String @@(Call -MakeHeaderDefined fn @@classname@@.h)@@:U)@@ -!!// -!!// hasparentclass indicates if a parent class has been defined. -!!Set hasparentclass 0 -!!If @@parentclassname@@ != = -!!Set hasparentclass 1 -!!Else -!!If @@isunittest@@ -!!Set parentclassname CppUnit::TestFixture -!!Set hasparentclass 1 -!!Endif -!!Endif -!!// -!!// hasparent is set to 1 if the class has some parent (ERefObj or parentclass). -!!Set hasparent @@hasparentclass@@ -!!If @@isrefobj@@ -!!Set hasparent 1 -!!Endif -!!// -!!// -!!// All variables are set, we can now generates the class. -!!// -!!// -!!// -!!// -!!// ---------------------------------------------------------------------------- -!!// ------------------------------ header file --------------------------------- -!!// ---------------------------------------------------------------------------- -!!// -!!// -!!// -!!If @@createfile@@ -!!FileNew @@headerfn@@ dsp -!!Set headerpath @@(FilePath)@@ -#ifndef @@headerdefine@@ -#define @@headerdefine@@ -!!Else -// ////////////////////////////////////////////////////////////////////////// -// ////////////////////////////////////////////////////////////////////////// -// Definition of class @@classname@@ -// ////////////////////////////////////////////////////////////////////////// -// ////////////////////////////////////////////////////////////////////////// -!!Endif -!!If @@hasparentclass@@ - -!!If @@isunittest@@ -#include <cppunit/extensions/HelperMacros.h> -!!Else -#include "@@parentclassname@@.h" -!!Endif -!!Endif - - -namespace CppUnit -{ - -!!If @@isrefobj@@ -/*! Declare @@classname@@Ref as a reference pointer on @@classname@@. - */ -EDECL_REF( @@classname@@ ); - - - -!!Endif -/*! \class @@classname@@ - * \brief @@classdesc@@ - */ -class @@classname@@@@\ -!!// Write inherited class list (parent class first, then ERefObj if inherited). -!!If @@hasparent@@ - : @@\ -!!// xpos contains the indentation level for inheritance declarations... -!!GetPos xpos ypos -!!Sub xpos 1 -public @@\ -!!Else - -!!Endif -!!If @@hasparentclass@@ -@@parentclassname@@@@\ -!!If @@isrefobj@@ -, -@@(Call -MakeFiller filler " " count @@xpos@@)@@@@\ -public @@\ -!!Else - -!!Endif -!!Endif -!!If @@isrefobj@@ -ERefObj -!!Endif -{ -!!// -!!// -!!// ------------ Done with inheritance, declare the class body... ---------- -!!// -!!// -!!If @@isunittest@@ - CPPUNIT_TEST_SUITE( @@classname@@ ); - CPPUNIT_TEST( putTestMethodNameHere ); - CPPUNIT_TEST_SUITE_END(); - -!!Endif -public: -!!If !@@defvalobject@@ - /*! Constructs a @@classname@@ object. - */ - @@classname@@(); - -!!Endif -!!If @@valobject@@ - /*! Copy constructor. - * @param copy Object to copy. - */ - @@classname@@( const @@classname@@ © ); - -!!Endif - /// Destructor. - virtual ~@@classname@@(); -!!If @@valobject@@ - - /*! Copy operator. - * @param copy Object to copy. - * @return Reference on this object. - */ - @@classname@@ &operator =( const @@classname@@ © ); -!!Endif -!!If @@isunittest@@ - - void setUp(); - void tearDown(); -!!Endif -!!// Private for methods -!!If @@refobject@@ - -private: - /// Prevents the use of the copy constructor. - @@classname@@( const @@classname@@ © ); - - /// Prevents the use of the copy operator. - void operator =( const @@classname@@ © ); -!!Endif -!!// Private for member datas - -private: -}; - - - -!!If @@createfile@@ -// Inlines methods for @@classname@@:@@\ -!!GetPos xpos ypos -!!Sub xpos 4 - -// @@(Call -MakeFiller filler - count @@xpos@@)@@ -!!Endif //@@createfile@@ -!!If @@inlinectordtor@@ -!!If !@@defvalobject@@ - - -inline -@@classname@@::@@classname@@()@@\ -!!If @@hasparentclass@@ - : - @@parentclassname@@() -!!Else - -!!Endif -{ -} -!!Endif //!@@defvalobject@@ -!!If @@valobject@@ - - -inline -@@classname@@::@@classname@@( const @@classname@@ © )@@\ -!!If @@hasparentclass@@ - : - @@parentclassname@@( copy ) -!!Else - -!!Endif -!!Endif //@@valobject@@ - - -inline -@@classname@@::~@@classname@@() -{ -} -!!If @@valobject@@ - - -inline @@classname@@ & -@@classname@@::operator =( const @@classname@@ © ) -{ - - return *this; -} -!!Endif //@@valobject@@ -!!Endif //@@inlinectordtor@@ - - -} // namespace CppUnit - -!!If @@createfile@@ - -#endif // @@headerdefine@@ -!!FileSave -!!ProjectFileAdd -!!Endif -!!// -!!// -!!// -!!// ---------------------------------------------------------------------------- -!!// -------------------------- Implementation file ----------------------------- -!!// ---------------------------------------------------------------------------- -!!// -!!// -!!// -!!If @@createfile@@ -!!FileNew @@implfn@@ dsp -#include <cppunit/@@classname@@.h> -!!Else - - -// ////////////////////////////////////////////////////////////////////////// -// Implementation of class @@classname@@ -// ////////////////////////////////////////////////////////////////////////// -!!Endif - - -namespace CppUnit -{ - - -!!If @@isunittest@@ - -CPPUNIT_TEST_SUITE_REGISTRATION( @@classname@@ ); -!!Endif -!!If !@@inlinectordtor@@ -!!If !@@defvalobject@@ - - -@@classname@@::@@classname@@()@@\ -!!If @@hasparentclass@@ - : - @@parentclassname@@() -!!Else - -!!Endif -{ -} -!!Endif -!!If @@valobject@@ - - -@@classname@@::@@classname@@( const @@classname@@ © )@@\ -!!If @@hasparentclass@@ - : - @@parentclassname@@( copy ) -!!Else - -!!Endif -{ -} -!!Endif - - -@@classname@@::~@@classname@@() -{ -} -!!If @@valobject@@ - - -@@classname@@ & -@@classname@@::operator =( const @@classname@@ © ) -{ - - return *this; -} -!!Endif -!!Endif -!!If @@isunittest@@ - - -void -@@classname@@::setUp() -{ -} - - -void -@@classname@@::tearDown() -{ -} -!!Endif - - -} // namespace CppUnit - -!!If @@createfile@@ -!!FileSave -!!ProjectFileAdd -!!//ExecuteCommand FileOpen "@@headerpath@@" -!!Endif -!!End - ---------------------------------------------------------------------------------- ---------------------------------------------------------------------------------- -[-Dummy] -!!Code -!!End - ---------------------------------------------------------------------------------- ------------------------- [-MakeHeaderDefined] ------------------------------- ---------------------------------------------------------------------------------- -[-MakeHeaderDefined] -!!Memo -This template replace all occurences of '.' in the specified filename "fn" by '_'. -This is typically used to make the #ifndef at the beginning of header files. -Parameters: "fn" filename in which each occurence of '.' is replaced by '_'. -Returns: Transformed filename. -!!End - -!!Params -fn TestDoIt -!!End - -!!Code -!!Set result @@fn@@ -!!Label LoopMakeHeaderDefined -!!Set fn @@result@@ -!!// Check if there is any occurence left of '.' -!!Set index @@(StrFind @@fn@@ ".")@@ -!!If @@index@@ < 0 -!!Goto EndMakeHeaderDefined -!!Endif -!!// Replace occurences of '.' in fb by '_' and set to result. -!!Set result @@(StrSub @@fn@@ 0 @@index@@ )@@_ -!!Add index 1 -!!Set result @@result@@@@(StrSub @@fn@@ @@index@@)@@ -!!Goto LoopMakeHeaderDefined -!!Label EndMakeHeaderDefined -!!Return CPPUNIT_@@result@@ -!!End - ---------------------------------------------------------------------------------- ----------------------------- [-MakeFiller] ---------------------------------- ---------------------------------------------------------------------------------- -[-MakeFiller] -!!Memo -Make a string that contains "count" occurrence of "filler". -Parameters: "filler" String that is repeated. - "count" Number of times the "filler" is repeated. -Returns: A string that contains "count" times the string "filler". -!!End - -!!Params -filler - -count 10 -!!End - -!!Code -!!Set result -!!Label LoopMakerFiller -!!If @@count@@ > 0 -!!Set result @@result@@@@filler@@ -!!Sub count 1 -!!Goto LoopMakerFiller -!!Endif -!!Return @@result@@ -!!End
\ No newline at end of file diff --git a/contrib/msvc/UnitTestAddIn.zip b/contrib/msvc/UnitTestAddIn.zip Binary files differdeleted file mode 100644 index 7f9ea5a..0000000 --- a/contrib/msvc/UnitTestAddIn.zip +++ /dev/null diff --git a/contrib/msvc/readme.txt b/contrib/msvc/readme.txt deleted file mode 100644 index e678eea..0000000 --- a/contrib/msvc/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -What's in those files: - - * CppUnit.WWTpl: a template Workspace Whiz! which create a new class -and add the new files to the project. You can specify that the class is a -CppUnit testcase and all the macro will be defined to register the test case -and declare the test suite. Workspace Whiz! is an add-ins for VC++. It can -be found at: http://www.workspacewhiz.com/. - - * AddingUnitTestMethod.dsm: a set of VC++ macro to add unit test -using helper macros.
\ No newline at end of file diff --git a/contrib/readme.txt b/contrib/readme.txt index 658b870..f1f1cbc 100644 --- a/contrib/readme.txt +++ b/contrib/readme.txt @@ -1,21 +1,5 @@ What's in those files: -bc5/: - * bc5-makefile.zip: makefile for CppUnit with Borland C++ 5.5 free compiler. - contributed by 'cuppa' project team (http://sourceforge.jp/projects/cuppa/). - See instruction 'readme_en.txt' in the zip. - -msvc/: - - * CppUnit.WWTpl: a template Workspace Whiz! which create a new class -and add the new files to the project. You can specify that the class is a -CppUnit testcase and all the macro will be defined to register the test case -and declare the test suite. Workspace Whiz! is an add-ins for VC++. It can -be found at: http://www.workspacewhiz.com/. - - * AddingUnitTestMethod.dsm: a set of VC++ macro to add unit test -using helper macros. - xml-xsl/: * report.xsl: a xml style sheet contributed by 'cuppa' project team @@ -25,4 +9,4 @@ HTML. Windows user can test it by running tests.xml (require Internet Explorer * cppunit2junit.xsl: XSLT for compatibility with Ant junit xml formatter (patch #1112053 contributed by BARBOSA Norbert. - See cppunit2junit.txt for details).
\ No newline at end of file + See cppunit2junit.txt for details). |