mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-26 16:19:30 +03:00
Adding Borland C++ Builder 5 support.
Included the project files as well as the automatically generated makefiles. The library compiles without issues. Borland requires the UnitTest namespace to be defined at the beginning of tests. Added an default to have no support for C++11. Added a Borland to the list of compilers that don't recognize "long long" but use __int64 instead.
This commit is contained in:
parent
d8e27e1825
commit
2809901115
18 changed files with 693 additions and 3 deletions
25
UnitTestcpp.bpg
Normal file
25
UnitTestcpp.bpg
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#------------------------------------------------------------------------------
|
||||
VERSION = BWS.01
|
||||
#------------------------------------------------------------------------------
|
||||
!ifndef ROOT
|
||||
ROOT = $(MAKEDIR)\..
|
||||
!endif
|
||||
#------------------------------------------------------------------------------
|
||||
MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
|
||||
DCC = $(ROOT)\bin\dcc32.exe $**
|
||||
BRCC = $(ROOT)\bin\brcc32.exe $**
|
||||
#------------------------------------------------------------------------------
|
||||
PROJECTS = UnitTestcppLib.lib UnitTestcppTest.exe
|
||||
#------------------------------------------------------------------------------
|
||||
default: $(PROJECTS)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
UnitTestcppLib.lib: UnitTestcppLib.bpr
|
||||
$(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
|
||||
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
|
||||
|
||||
UnitTestcppTest.exe: UnitTestcppTest.bpr
|
||||
$(ROOT)\bin\bpr2mak $**
|
||||
$(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
|
||||
|
||||
|
||||
30
UnitTestcppLib.bpf
Normal file
30
UnitTestcppLib.bpf
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
//---------------------------------------------------------------------------
|
||||
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
USEUNIT("UnitTest++\AssertException.cpp");
|
||||
USEUNIT("UnitTest++\Checks.cpp");
|
||||
USEUNIT("UnitTest++\CompositeTestReporter.cpp");
|
||||
USEUNIT("UnitTest++\CurrentTest.cpp");
|
||||
USEUNIT("UnitTest++\DeferredTestReporter.cpp");
|
||||
USEUNIT("UnitTest++\DeferredTestResult.cpp");
|
||||
USEUNIT("UnitTest++\MemoryOutStream.cpp");
|
||||
USEUNIT("UnitTest++\ReportAssert.cpp");
|
||||
USEUNIT("UnitTest++\Test.cpp");
|
||||
USEUNIT("UnitTest++\TestDetails.cpp");
|
||||
USEUNIT("UnitTest++\TestList.cpp");
|
||||
USEUNIT("UnitTest++\TestReporter.cpp");
|
||||
USEUNIT("UnitTest++\TestReporterStdout.cpp");
|
||||
USEUNIT("UnitTest++\TestResults.cpp");
|
||||
USEUNIT("UnitTest++\TestRunner.cpp");
|
||||
USEUNIT("UnitTest++\TimeConstraint.cpp");
|
||||
USEUNIT("UnitTest++\XmlTestReporter.cpp");
|
||||
USEUNIT("UnitTest++\Win32\TimeHelpers.cpp");
|
||||
USEUNIT("UnitTest++\RequiredCheckException.cpp");
|
||||
USEUNIT("UnitTest++\RequiredCheckTestReporter.cpp");
|
||||
USEUNIT("UnitTest++\ThrowingTestReporter.cpp");
|
||||
//---------------------------------------------------------------------------
|
||||
#define Library
|
||||
|
||||
// To add a file to the library use the Project menu 'Add to Project'.
|
||||
|
||||
95
UnitTestcppLib.bpr
Normal file
95
UnitTestcppLib.bpr
Normal file
|
|
@ -0,0 +1,95 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!-- C++Builder XML Project -->
|
||||
<PROJECT>
|
||||
<MACROS>
|
||||
<VERSION value="BCB.05.03"/>
|
||||
<PROJECT value="UnitTestcppLib.lib"/>
|
||||
<OBJFILES value="UnitTest++\AssertException.obj UnitTest++\Checks.obj
|
||||
UnitTest++\CompositeTestReporter.obj UnitTest++\CurrentTest.obj
|
||||
UnitTest++\DeferredTestReporter.obj UnitTest++\DeferredTestResult.obj
|
||||
UnitTest++\MemoryOutStream.obj UnitTest++\ReportAssert.obj
|
||||
UnitTest++\Test.obj UnitTest++\TestDetails.obj UnitTest++\TestList.obj
|
||||
UnitTest++\TestReporter.obj UnitTest++\TestReporterStdout.obj
|
||||
UnitTest++\TestResults.obj UnitTest++\TestRunner.obj
|
||||
UnitTest++\TimeConstraint.obj UnitTest++\XmlTestReporter.obj
|
||||
UnitTest++\Win32\TimeHelpers.obj UnitTest++\RequiredCheckException.obj
|
||||
UnitTest++\RequiredCheckTestReporter.obj UnitTest++\ThrowingTestReporter.obj"/>
|
||||
<RESFILES value=""/>
|
||||
<DEFFILE value=""/>
|
||||
<RESDEPEN value="$(RESFILES)"/>
|
||||
<LIBFILES value=""/>
|
||||
<LIBRARIES value=""/>
|
||||
<PACKAGES value=""/>
|
||||
<PATHCPP value=".;UnitTest++;UnitTest++\Win32"/>
|
||||
<PATHPAS value=".;"/>
|
||||
<PATHRC value=".;"/>
|
||||
<PATHASM value=".;"/>
|
||||
<LINKER value="TLib"/>
|
||||
<USERDEFINES value="_DEBUG"/>
|
||||
<SYSDEFINES value="_RTLDLL;NO_STRICT"/>
|
||||
<MAINSOURCE value="UnitTestcppLib.bpf"/>
|
||||
<INCLUDEPATH value="UnitTest++\Win32;UnitTest++;$(BCB)\include;$(BCB)\include\vcl"/>
|
||||
<LIBPATH value="UnitTest++\Win32;UnitTest++;$(BCB)\lib\obj;$(BCB)\lib"/>
|
||||
<WARNINGS value="-w-par"/>
|
||||
<LISTFILE value=""/>
|
||||
</MACROS>
|
||||
<OPTIONS>
|
||||
<CFLAG1 value="-Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c
|
||||
-tW -tWM"/>
|
||||
<PFLAGS value="-$YD -$W -$O- -v -JPHNE -M"/>
|
||||
<AFLAGS value="/mx /w2 /zd"/>
|
||||
<LFLAGS value=""/>
|
||||
</OPTIONS>
|
||||
<LINKER>
|
||||
<ALLOBJ value="$(OBJFILES)"/>
|
||||
<ALLLIB value=""/>
|
||||
</LINKER>
|
||||
<IDEOPTIONS>
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
RemoteHost=
|
||||
RemotePath=
|
||||
RemoteDebug=0
|
||||
|
||||
[Compiler]
|
||||
ShowInfoMsgs=0
|
||||
LinkDebugVcl=0
|
||||
LinkCGLIB=0
|
||||
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
||||
197
UnitTestcppLib.mak
Normal file
197
UnitTestcppLib.mak
Normal file
|
|
@ -0,0 +1,197 @@
|
|||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# IDE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# The following section of the project makefile is managed by the BCB IDE.
|
||||
# It is recommended to use the IDE to change any of the values in this
|
||||
# section.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
VERSION = BCB.05.03
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = UnitTestcppLib.lib
|
||||
OBJFILES = UnitTest++\AssertException.obj UnitTest++\Checks.obj \
|
||||
UnitTest++\CompositeTestReporter.obj UnitTest++\CurrentTest.obj \
|
||||
UnitTest++\DeferredTestReporter.obj UnitTest++\DeferredTestResult.obj \
|
||||
UnitTest++\MemoryOutStream.obj UnitTest++\ReportAssert.obj \
|
||||
UnitTest++\Test.obj UnitTest++\TestDetails.obj UnitTest++\TestList.obj \
|
||||
UnitTest++\TestReporter.obj UnitTest++\TestReporterStdout.obj \
|
||||
UnitTest++\TestResults.obj UnitTest++\TestRunner.obj \
|
||||
UnitTest++\TimeConstraint.obj UnitTest++\XmlTestReporter.obj \
|
||||
UnitTest++\Win32\TimeHelpers.obj UnitTest++\RequiredCheckException.obj \
|
||||
UnitTest++\RequiredCheckTestReporter.obj UnitTest++\ThrowingTestReporter.obj
|
||||
RESFILES =
|
||||
MAINSOURCE = UnitTestcppLib.bpf
|
||||
RESDEPEN = $(RESFILES)
|
||||
LIBFILES =
|
||||
IDLFILES =
|
||||
IDLGENFILES =
|
||||
LIBRARIES =
|
||||
PACKAGES =
|
||||
SPARELIBS =
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;UnitTest++;UnitTest++\Win32
|
||||
PATHASM = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
LINKER = TLib
|
||||
DEBUGLIBPATH =
|
||||
RELEASELIBPATH =
|
||||
USERDEFINES = _DEBUG
|
||||
SYSDEFINES = _RTLDLL;NO_STRICT
|
||||
INCLUDEPATH = UnitTest++\Win32;UnitTest++;$(BCB)\include;$(BCB)\include\vcl
|
||||
LIBPATH = UnitTest++\Win32;UnitTest++;$(BCB)\lib\obj;$(BCB)\lib
|
||||
WARNINGS = -w-par
|
||||
LISTFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c \
|
||||
-tW -tWM
|
||||
IDLCFLAGS =
|
||||
PFLAGS = -$YD -$W -$O- -v -JPHNE -M
|
||||
RFLAGS =
|
||||
AFLAGS = /mx /w2 /zd
|
||||
LFLAGS =
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = $(OBJFILES)
|
||||
ALLRES =
|
||||
ALLLIB =
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
!endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MAKE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# This section of the project file is not used by the BCB IDE. It is for
|
||||
# the benefit of building from the command-line using the MAKE utility.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
!if "$(USERDEFINES)" != ""
|
||||
AUSERDEFINES = -d$(USERDEFINES:;= -d)
|
||||
!else
|
||||
AUSERDEFINES =
|
||||
!endif
|
||||
|
||||
!if !$d(BCC32)
|
||||
BCC32 = bcc32
|
||||
!endif
|
||||
|
||||
!if !$d(CPP32)
|
||||
CPP32 = cpp32
|
||||
!endif
|
||||
|
||||
!if !$d(DCC32)
|
||||
DCC32 = dcc32
|
||||
!endif
|
||||
|
||||
!if !$d(TASM32)
|
||||
TASM32 = tasm32
|
||||
!endif
|
||||
|
||||
!if !$d(LINKER)
|
||||
LINKER = TLib
|
||||
!endif
|
||||
|
||||
!if !$d(BRCC32)
|
||||
BRCC32 = brcc32
|
||||
!endif
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
!if $d(PATHCPP)
|
||||
.PATH.CPP = $(PATHCPP)
|
||||
.PATH.C = $(PATHCPP)
|
||||
!endif
|
||||
|
||||
!if $d(PATHPAS)
|
||||
.PATH.PAS = $(PATHPAS)
|
||||
!endif
|
||||
|
||||
!if $d(PATHASM)
|
||||
.PATH.ASM = $(PATHASM)
|
||||
!endif
|
||||
|
||||
!if $d(PATHRC)
|
||||
.PATH.RC = $(PATHRC)
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
!if "$(LISTFILE)" == ""
|
||||
COMMA =
|
||||
!else
|
||||
COMMA = ,
|
||||
!endif
|
||||
|
||||
$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) /u $@ @&&!
|
||||
$(LFLAGS) $? $(COMMA) $(LISTFILE)
|
||||
|
||||
!
|
||||
# ---------------------------------------------------------------------------
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
|
||||
|
||||
.c.i:
|
||||
$(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
|
||||
|
||||
.cpp.i:
|
||||
$(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
|
||||
|
||||
.asm.obj:
|
||||
$(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $<
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
27
UnitTestcppTest.bpf
Normal file
27
UnitTestcppTest.bpf
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
USEUNIT("tests\Main.cpp");
|
||||
USELIB("UnitTestcppLib.lib");
|
||||
USEUNIT("tests\TestAssertHandler.cpp");
|
||||
USEUNIT("tests\TestCheckMacros.cpp");
|
||||
USEUNIT("tests\TestChecks.cpp");
|
||||
USEUNIT("tests\TestCompositeTestReporter.cpp");
|
||||
USEUNIT("tests\TestCurrentTest.cpp");
|
||||
USEUNIT("tests\TestDeferredTestReporter.cpp");
|
||||
USEUNIT("tests\TestExceptions.cpp");
|
||||
USEUNIT("tests\TestLongMacros.cpp");
|
||||
USEUNIT("tests\TestMemoryOutStream.cpp");
|
||||
USEUNIT("tests\TestRequireMacrosWithExceptionsOff.cpp");
|
||||
USEUNIT("tests\TestRequireMacrosWithExceptionsOn.cpp");
|
||||
USEUNIT("tests\TestTest.cpp");
|
||||
USEUNIT("tests\TestTestList.cpp");
|
||||
USEUNIT("tests\TestTestMacros.cpp");
|
||||
USEUNIT("tests\TestTestResults.cpp");
|
||||
USEUNIT("tests\TestTestRunner.cpp");
|
||||
USEUNIT("tests\TestTestSuite.cpp");
|
||||
USEUNIT("tests\TestTimeConstraint.cpp");
|
||||
USEUNIT("tests\TestTimeConstraintMacro.cpp");
|
||||
USEUNIT("tests\TestUnitTestPP.cpp");
|
||||
USEUNIT("tests\TestXmlTestReporter.cpp");
|
||||
//---------------------------------------------------------------------------
|
||||
This file is used by the project manager only and should be treated like the project file
|
||||
|
||||
main
|
||||
102
UnitTestcppTest.bpr
Normal file
102
UnitTestcppTest.bpr
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!-- C++Builder XML Project -->
|
||||
<PROJECT>
|
||||
<MACROS>
|
||||
<VERSION value="BCB.05.03"/>
|
||||
<PROJECT value="UnitTestcppTest.exe"/>
|
||||
<OBJFILES value="tests\Main.obj tests\TestAssertHandler.obj tests\TestCheckMacros.obj
|
||||
tests\TestChecks.obj tests\TestCompositeTestReporter.obj
|
||||
tests\TestCurrentTest.obj tests\TestDeferredTestReporter.obj
|
||||
tests\TestExceptions.obj tests\TestLongMacros.obj
|
||||
tests\TestMemoryOutStream.obj tests\TestRequireMacrosWithExceptionsOff.obj
|
||||
tests\TestRequireMacrosWithExceptionsOn.obj tests\TestTest.obj
|
||||
tests\TestTestList.obj tests\TestTestMacros.obj tests\TestTestResults.obj
|
||||
tests\TestTestRunner.obj tests\TestTestSuite.obj
|
||||
tests\TestTimeConstraint.obj tests\TestTimeConstraintMacro.obj
|
||||
tests\TestUnitTestPP.obj tests\TestXmlTestReporter.obj"/>
|
||||
<RESFILES value=""/>
|
||||
<DEFFILE value=""/>
|
||||
<RESDEPEN value="$(RESFILES)"/>
|
||||
<LIBFILES value="UnitTestcppLib.lib"/>
|
||||
<LIBRARIES value=""/>
|
||||
<SPARELIBS value="Vcl50.lib"/>
|
||||
<PACKAGES value="Vcl50.bpi Vclx50.bpi bcbsmp50.bpi Qrpt50.bpi Vcldb50.bpi Vclbde50.bpi
|
||||
ibsmp50.bpi vcldbx50.bpi TeeUI50.bpi TeeDB50.bpi Tee50.bpi TeeQR50.bpi
|
||||
VCLIB50.bpi bcbie50.bpi vclie50.bpi Inetdb50.bpi Inet50.bpi NMFast50.bpi
|
||||
dclocx50.bpi bcb2kaxserver50.bpi"/>
|
||||
<PATHCPP value=".;tests"/>
|
||||
<PATHPAS value=".;"/>
|
||||
<PATHRC value=".;"/>
|
||||
<PATHASM value=".;"/>
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="tlink32"/>
|
||||
<USERDEFINES value="_DEBUG"/>
|
||||
<SYSDEFINES value="NO_STRICT;_RTLDLL;USEPACKAGES"/>
|
||||
<MAINSOURCE value="UnitTestcppTest.bpf"/>
|
||||
<INCLUDEPATH value="tests;$(BCB)\include;$(BCB)\include\vcl"/>
|
||||
<LIBPATH value="tests;$(BCB)\lib\obj;$(BCB)\lib"/>
|
||||
<WARNINGS value="-w-par"/>
|
||||
</MACROS>
|
||||
<OPTIONS>
|
||||
<CFLAG1 value="-tWC -tWM -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v
|
||||
-vi- -c"/>
|
||||
<PFLAGS value="-$YD -$W -$O- -v -JPHNE -M"/>
|
||||
<RFLAGS value=""/>
|
||||
<AFLAGS value="/mx /w2 /zd"/>
|
||||
<LFLAGS value="-Tpe -ap -D"" -x -Gn -v"/>
|
||||
</OPTIONS>
|
||||
<LINKER>
|
||||
<ALLOBJ value="c0x32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)"/>
|
||||
<ALLRES value="$(RESFILES)"/>
|
||||
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib"/>
|
||||
</LINKER>
|
||||
<IDEOPTIONS>
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
Locale=1033
|
||||
CodePage=1252
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
[Parameters]
|
||||
RunParams=
|
||||
HostApplication=
|
||||
RemoteHost=
|
||||
RemotePath=
|
||||
RemoteDebug=0
|
||||
|
||||
[Compiler]
|
||||
ShowInfoMsgs=0
|
||||
LinkDebugVcl=0
|
||||
LinkCGLIB=0
|
||||
|
||||
[Language]
|
||||
ActiveLang=
|
||||
ProjectLang=
|
||||
RootDir=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
||||
196
UnitTestcppTest.mak
Normal file
196
UnitTestcppTest.mak
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# IDE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# The following section of the project makefile is managed by the BCB IDE.
|
||||
# It is recommended to use the IDE to change any of the values in this
|
||||
# section.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
VERSION = BCB.05.03
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = UnitTestcppTest.exe
|
||||
OBJFILES = tests\Main.obj tests\TestAssertHandler.obj tests\TestCheckMacros.obj \
|
||||
tests\TestChecks.obj tests\TestCompositeTestReporter.obj \
|
||||
tests\TestCurrentTest.obj tests\TestDeferredTestReporter.obj \
|
||||
tests\TestExceptions.obj tests\TestLongMacros.obj \
|
||||
tests\TestMemoryOutStream.obj tests\TestRequireMacrosWithExceptionsOff.obj \
|
||||
tests\TestRequireMacrosWithExceptionsOn.obj tests\TestTest.obj \
|
||||
tests\TestTestList.obj tests\TestTestMacros.obj tests\TestTestResults.obj \
|
||||
tests\TestTestRunner.obj tests\TestTestSuite.obj \
|
||||
tests\TestTimeConstraint.obj tests\TestTimeConstraintMacro.obj \
|
||||
tests\TestUnitTestPP.obj tests\TestXmlTestReporter.obj
|
||||
RESFILES =
|
||||
MAINSOURCE = UnitTestcppTest.bpf
|
||||
RESDEPEN = $(RESFILES)
|
||||
LIBFILES = UnitTestcppLib.lib
|
||||
IDLFILES =
|
||||
IDLGENFILES =
|
||||
LIBRARIES =
|
||||
PACKAGES = Vcl50.bpi Vclx50.bpi bcbsmp50.bpi Qrpt50.bpi Vcldb50.bpi Vclbde50.bpi \
|
||||
ibsmp50.bpi vcldbx50.bpi TeeUI50.bpi TeeDB50.bpi Tee50.bpi TeeQR50.bpi \
|
||||
VCLIB50.bpi bcbie50.bpi vclie50.bpi Inetdb50.bpi Inet50.bpi NMFast50.bpi \
|
||||
dclocx50.bpi bcb2kaxserver50.bpi
|
||||
SPARELIBS = Vcl50.lib
|
||||
DEFFILE =
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;tests
|
||||
PATHASM = .;
|
||||
PATHPAS = .;
|
||||
PATHRC = .;
|
||||
DEBUGLIBPATH = $(BCB)\lib\debug
|
||||
RELEASELIBPATH = $(BCB)\lib\release
|
||||
USERDEFINES = _DEBUG
|
||||
SYSDEFINES = NO_STRICT;_RTLDLL;USEPACKAGES
|
||||
INCLUDEPATH = tests;$(BCB)\include;$(BCB)\include\vcl
|
||||
LIBPATH = tests;$(BCB)\lib\obj;$(BCB)\lib
|
||||
WARNINGS= -w-par
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -tWC -tWM -Od -H=$(BCB)\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v \
|
||||
-vi- -c
|
||||
IDLCFLAGS =
|
||||
PFLAGS = -$YD -$W -$O- -v -JPHNE -M
|
||||
RFLAGS =
|
||||
AFLAGS = /mx /w2 /zd
|
||||
LFLAGS = -Tpe -ap -D"" -x -Gn -v
|
||||
# ---------------------------------------------------------------------------
|
||||
ALLOBJ = c0x32.obj $(PACKAGES) Memmgr.Lib sysinit.obj $(OBJFILES)
|
||||
ALLRES = $(RESFILES)
|
||||
ALLLIB = $(LIBFILES) $(LIBRARIES) import32.lib cp32mti.lib
|
||||
# ---------------------------------------------------------------------------
|
||||
!ifdef IDEOPTIONS
|
||||
|
||||
[Version Info]
|
||||
IncludeVerInfo=0
|
||||
AutoIncBuild=0
|
||||
MajorVer=1
|
||||
MinorVer=0
|
||||
Release=0
|
||||
Build=0
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
Private=0
|
||||
DLL=0
|
||||
|
||||
[Version Info Keys]
|
||||
CompanyName=
|
||||
FileDescription=
|
||||
FileVersion=1.0.0.0
|
||||
InternalName=
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
OriginalFilename=
|
||||
ProductName=
|
||||
ProductVersion=1.0.0.0
|
||||
Comments=
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=$(BCB)\source\vcl
|
||||
|
||||
!endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# MAKE SECTION
|
||||
# ---------------------------------------------------------------------------
|
||||
# This section of the project file is not used by the BCB IDE. It is for
|
||||
# the benefit of building from the command-line using the MAKE utility.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
!if "$(USERDEFINES)" != ""
|
||||
AUSERDEFINES = -d$(USERDEFINES:;= -d)
|
||||
!else
|
||||
AUSERDEFINES =
|
||||
!endif
|
||||
|
||||
!if !$d(BCC32)
|
||||
BCC32 = bcc32
|
||||
!endif
|
||||
|
||||
!if !$d(CPP32)
|
||||
CPP32 = cpp32
|
||||
!endif
|
||||
|
||||
!if !$d(DCC32)
|
||||
DCC32 = dcc32
|
||||
!endif
|
||||
|
||||
!if !$d(TASM32)
|
||||
TASM32 = tasm32
|
||||
!endif
|
||||
|
||||
!if !$d(LINKER)
|
||||
LINKER = ilink32
|
||||
!endif
|
||||
|
||||
!if !$d(BRCC32)
|
||||
BRCC32 = brcc32
|
||||
!endif
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
!if $d(PATHCPP)
|
||||
.PATH.CPP = $(PATHCPP)
|
||||
.PATH.C = $(PATHCPP)
|
||||
!endif
|
||||
|
||||
!if $d(PATHPAS)
|
||||
.PATH.PAS = $(PATHPAS)
|
||||
!endif
|
||||
|
||||
!if $d(PATHASM)
|
||||
.PATH.ASM = $(PATHASM)
|
||||
!endif
|
||||
|
||||
!if $d(PATHRC)
|
||||
.PATH.RC = $(PATHRC)
|
||||
!endif
|
||||
# ---------------------------------------------------------------------------
|
||||
$(PROJECT): $(IDLGENFILES) $(OBJFILES) $(RESDEPEN) $(DEFFILE)
|
||||
$(BCB)\BIN\$(LINKER) @&&!
|
||||
$(LFLAGS) -L$(LIBPATH) +
|
||||
$(ALLOBJ), +
|
||||
$(PROJECT),, +
|
||||
$(ALLLIB), +
|
||||
$(DEFFILE), +
|
||||
$(ALLRES)
|
||||
!
|
||||
# ---------------------------------------------------------------------------
|
||||
.pas.hpp:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
|
||||
|
||||
.pas.obj:
|
||||
$(BCB)\BIN\$(DCC32) $(PFLAGS) -U$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -O$(INCLUDEPATH) --BCB {$< }
|
||||
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
|
||||
|
||||
.c.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n$(@D) {$< }
|
||||
|
||||
.c.i:
|
||||
$(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
|
||||
|
||||
.cpp.i:
|
||||
$(BCB)\BIN\$(CPP32) $(CFLAG1) $(WARNINGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -n. {$< }
|
||||
|
||||
.asm.obj:
|
||||
$(BCB)\BIN\$(TASM32) $(AFLAGS) -i$(INCLUDEPATH:;= -i) $(AUSERDEFINES) -d$(SYSDEFINES:;= -d) $<, $@
|
||||
|
||||
.rc.res:
|
||||
$(BCB)\BIN\$(BRCC32) $(RFLAGS) -I$(INCLUDEPATH) -D$(USERDEFINES);$(SYSDEFINES) -fo$@ $<
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
#include "UnitTest++/UnitTestPP.h"
|
||||
#ifdef __BORLANDC__
|
||||
#include <vcl.h>
|
||||
#endif
|
||||
|
||||
int main(int, char const *[])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "ScopedCurrentTest.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace UnitTest;
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "UnitTest++/CurrentTest.h"
|
||||
#include "ScopedCurrentTest.h"
|
||||
|
||||
using namespace UnitTest;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <stdexcept>
|
||||
|
||||
using namespace std;
|
||||
using namespace UnitTest;
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "UnitTest++/UnitTestPP.h"
|
||||
|
||||
using namespace UnitTest;
|
||||
|
||||
// This file is not intended to test every little thing, just a few basics to hopefully ensure
|
||||
// the macros are working and the short macros are not defined.
|
||||
UNITTEST_SUITE(LongMacros)
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ namespace {
|
|||
TEST(StreamingLongLongWritesCorrectCharacters)
|
||||
{
|
||||
MemoryOutStream stream;
|
||||
#ifdef UNITTEST_COMPILER_IS_MSVC6
|
||||
#if defined(UNITTEST_COMPILER_IS_MSVC6) || defined(__BORLANDC__)
|
||||
stream << (__int64)-12345i64;
|
||||
#else
|
||||
stream << (long long)-12345ll;
|
||||
|
|
@ -199,7 +199,7 @@ namespace {
|
|||
TEST(StreamingUnsignedLongLongWritesCorrectCharacters)
|
||||
{
|
||||
MemoryOutStream stream;
|
||||
#ifdef UNITTEST_COMPILER_IS_MSVC6
|
||||
#if defined(UNITTEST_COMPILER_IS_MSVC6) || defined(__BORLANDC__)
|
||||
stream << (unsigned __int64)85899ui64;
|
||||
#else
|
||||
stream << (unsigned long long)85899ull;
|
||||
|
|
@ -219,7 +219,7 @@ namespace {
|
|||
TEST(StreamingMinUnsignedLongLongWritesCorrectCharacters)
|
||||
{
|
||||
MemoryOutStream stream;
|
||||
#ifdef UNITTEST_COMPILER_IS_MSVC6
|
||||
#if defined(UNITTEST_COMPILER_IS_MSVC6) || defined(__BORLANDC__)
|
||||
stream << (unsigned __int64)0ui64;
|
||||
#else
|
||||
stream << (unsigned long long)0ull;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "ScopedCurrentTest.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace UnitTest;
|
||||
|
||||
#ifndef UNITTEST_NO_EXCEPTIONS
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ using namespace std;
|
|||
#else
|
||||
#define _NOEXCEPT_OP(x)
|
||||
#endif
|
||||
#else
|
||||
#define _NOEXCEPT_OP(x)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
@ -43,6 +45,7 @@ using namespace std;
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
TestList list1;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#include "UnitTest++/UnitTestPP.h"
|
||||
|
||||
using namespace UnitTest;
|
||||
|
||||
// We're really testing if it's possible to use the same suite in two files
|
||||
// to compile and link successfuly (TestTestSuite.cpp has suite with the same name)
|
||||
// Note: we are outside of the anonymous namespace
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include "RecordingReporter.h"
|
||||
#include "ScopedCurrentTest.h"
|
||||
|
||||
using namespace UnitTest;
|
||||
|
||||
namespace {
|
||||
|
||||
TEST(TimeConstraintMacroQualifiesNamespace)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#include "ScopedCurrentTest.h"
|
||||
|
||||
// These are sample tests that show the different features of the framework
|
||||
using namespace UnitTest;
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue