123
This commit is contained in:
8
STLPORT/test/regression/BccW32.cfg
Normal file
8
STLPORT/test/regression/BccW32.cfg
Normal file
@@ -0,0 +1,8 @@
|
||||
-w
|
||||
-R
|
||||
-v
|
||||
-vi
|
||||
-H
|
||||
-WC
|
||||
-g255
|
||||
-H-
|
||||
335
STLPORT/test/regression/MrCpp.mak
Normal file
335
STLPORT/test/regression/MrCpp.mak
Normal file
@@ -0,0 +1,335 @@
|
||||
!include "{stl}:src:MrCpp.mak"
|
||||
|
||||
MAKEFILE = MrCpp.mak
|
||||
|
||||
|
||||
Needed_SysLibs = <20>
|
||||
# "{PPCLibraries}MrCIOStreams.o" <20>
|
||||
"{STL}:lib:STLportLib{config_}.o" <20>
|
||||
"{SharedLibraries}InterfaceLib" <20>
|
||||
"{SharedLibraries}StdCLib_3.7" <20>
|
||||
"{SharedLibraries}MathLib" <20>
|
||||
"{PPCLibraries}StdCRuntime.o" <20>
|
||||
"{PPCLibraries}PPCCRuntime.o" <20>
|
||||
"{PPCLibraries}PPCToolLibs.o" <20>
|
||||
"{PPCLibraries}MrCPlusLib.o" <20>
|
||||
"{SharedLibraries}MrCExceptionsLib_4.1" <20>
|
||||
# end
|
||||
|
||||
|
||||
##################################################################################
|
||||
# test:regression: build rule
|
||||
##################################################################################
|
||||
Regression_Objects_PPC = <20>
|
||||
"{ObjDir}accum1.cpp.x" <20>
|
||||
"{ObjDir}accum2.cpp.x" <20>
|
||||
"{ObjDir}adjdiff0.cpp.x" <20>
|
||||
"{ObjDir}adjdiff1.cpp.x" <20>
|
||||
"{ObjDir}adjdiff2.cpp.x" <20>
|
||||
"{ObjDir}adjfind0.cpp.x" <20>
|
||||
"{ObjDir}adjfind1.cpp.x" <20>
|
||||
"{ObjDir}adjfind2.cpp.x" <20>
|
||||
"{ObjDir}advance.cpp.x" <20>
|
||||
"{ObjDir}alg1.cpp.x" <20>
|
||||
"{ObjDir}alg2.cpp.x" <20>
|
||||
"{ObjDir}alg3.cpp.x" <20>
|
||||
"{ObjDir}alg4.cpp.x" <20>
|
||||
"{ObjDir}alg5.cpp.x" <20>
|
||||
"{ObjDir}bcompos1.cpp.x" <20>
|
||||
"{ObjDir}bcompos2.cpp.x" <20>
|
||||
"{ObjDir}bind1st1.cpp.x" <20>
|
||||
"{ObjDir}bind1st2.cpp.x" <20>
|
||||
"{ObjDir}bind2nd1.cpp.x" <20>
|
||||
"{ObjDir}bind2nd2.cpp.x" <20>
|
||||
"{ObjDir}binsert1.cpp.x" <20>
|
||||
"{ObjDir}binsert2.cpp.x" <20>
|
||||
"{ObjDir}binsrch1.cpp.x" <20>
|
||||
"{ObjDir}binsrch2.cpp.x" <20>
|
||||
"{ObjDir}bitset1.cpp.x" <20>
|
||||
"{ObjDir}bnegate1.cpp.x" <20>
|
||||
"{ObjDir}bnegate2.cpp.x" <20>
|
||||
"{ObjDir}bvec1.cpp.x" <20>
|
||||
"{ObjDir}copy1.cpp.x" <20>
|
||||
"{ObjDir}copy2.cpp.x" <20>
|
||||
"{ObjDir}copy3.cpp.x" <20>
|
||||
"{ObjDir}copy4.cpp.x" <20>
|
||||
"{ObjDir}copyb.cpp.x" <20>
|
||||
"{ObjDir}copyb0.cpp.x" <20>
|
||||
"{ObjDir}count0.cpp.x" <20>
|
||||
"{ObjDir}count1.cpp.x" <20>
|
||||
"{ObjDir}countif1.cpp.x" <20>
|
||||
"{ObjDir}deque1.cpp.x" <20>
|
||||
"{ObjDir}divides.cpp.x" <20>
|
||||
"{ObjDir}eqlrnge0.cpp.x" <20>
|
||||
"{ObjDir}eqlrnge1.cpp.x" <20>
|
||||
"{ObjDir}eqlrnge2.cpp.x" <20>
|
||||
"{ObjDir}equal0.cpp.x" <20>
|
||||
"{ObjDir}equal1.cpp.x" <20>
|
||||
"{ObjDir}equal2.cpp.x" <20>
|
||||
"{ObjDir}equalto.cpp.x" <20>
|
||||
"{ObjDir}fill1.cpp.x" <20>
|
||||
"{ObjDir}filln1.cpp.x" <20>
|
||||
"{ObjDir}find0.cpp.x" <20>
|
||||
"{ObjDir}find1.cpp.x" <20>
|
||||
"{ObjDir}findif0.cpp.x" <20>
|
||||
"{ObjDir}findif1.cpp.x" <20>
|
||||
"{ObjDir}finsert1.cpp.x" <20>
|
||||
"{ObjDir}finsert2.cpp.x" <20>
|
||||
"{ObjDir}foreach0.cpp.x" <20>
|
||||
"{ObjDir}foreach1.cpp.x" <20>
|
||||
"{ObjDir}func1.cpp.x" <20>
|
||||
"{ObjDir}func2.cpp.x" <20>
|
||||
"{ObjDir}func3.cpp.x" <20>
|
||||
"{ObjDir}gener1.cpp.x" <20>
|
||||
"{ObjDir}gener2.cpp.x" <20>
|
||||
"{ObjDir}genern1.cpp.x" <20>
|
||||
"{ObjDir}genern2.cpp.x" <20>
|
||||
"{ObjDir}greateq.cpp.x" <20>
|
||||
"{ObjDir}greater.cpp.x" <20>
|
||||
"{ObjDir}hmap1.cpp.x" <20>
|
||||
"{ObjDir}hmmap1.cpp.x" <20>
|
||||
"{ObjDir}hmset1.cpp.x" <20>
|
||||
"{ObjDir}hset2.cpp.x" <20>
|
||||
"{ObjDir}incl0.cpp.x" <20>
|
||||
"{ObjDir}incl1.cpp.x" <20>
|
||||
"{ObjDir}incl2.cpp.x" <20>
|
||||
"{ObjDir}inplmrg1.cpp.x" <20>
|
||||
"{ObjDir}inplmrg2.cpp.x" <20>
|
||||
"{ObjDir}inrprod0.cpp.x" <20>
|
||||
"{ObjDir}inrprod1.cpp.x" <20>
|
||||
"{ObjDir}inrprod2.cpp.x" <20>
|
||||
"{ObjDir}insert1.cpp.x" <20>
|
||||
"{ObjDir}insert2.cpp.x" <20>
|
||||
"{ObjDir}iota1.cpp.x" <20>
|
||||
"{ObjDir}istmit1.cpp.x" <20>
|
||||
"{ObjDir}iter1.cpp.x" <20>
|
||||
"{ObjDir}iter2.cpp.x" <20>
|
||||
"{ObjDir}iter3.cpp.x" <20>
|
||||
"{ObjDir}iter4.cpp.x" <20>
|
||||
"{ObjDir}iterswp0.cpp.x" <20>
|
||||
"{ObjDir}iterswp1.cpp.x" <20>
|
||||
"{ObjDir}less.cpp.x" <20>
|
||||
"{ObjDir}lesseq.cpp.x" <20>
|
||||
"{ObjDir}lexcmp1.cpp.x" <20>
|
||||
"{ObjDir}lexcmp2.cpp.x" <20>
|
||||
"{ObjDir}list1.cpp.x" <20>
|
||||
"{ObjDir}list2.cpp.x" <20>
|
||||
"{ObjDir}list3.cpp.x" <20>
|
||||
"{ObjDir}list4.cpp.x" <20>
|
||||
"{ObjDir}logicand.cpp.x" <20>
|
||||
"{ObjDir}logicnot.cpp.x" <20>
|
||||
"{ObjDir}logicor.cpp.x" <20>
|
||||
"{ObjDir}lwrbnd1.cpp.x" <20>
|
||||
"{ObjDir}lwrbnd2.cpp.x" <20>
|
||||
"{ObjDir}map1.cpp.x" <20>
|
||||
"{ObjDir}max1.cpp.x" <20>
|
||||
"{ObjDir}max2.cpp.x" <20>
|
||||
"{ObjDir}maxelem1.cpp.x" <20>
|
||||
"{ObjDir}maxelem2.cpp.x" <20>
|
||||
"{ObjDir}memfunptr.cpp.x" <20>
|
||||
"{ObjDir}merge0.cpp.x" <20>
|
||||
"{ObjDir}merge1.cpp.x" <20>
|
||||
"{ObjDir}merge2.cpp.x" <20>
|
||||
"{ObjDir}min1.cpp.x" <20>
|
||||
"{ObjDir}min2.cpp.x" <20>
|
||||
"{ObjDir}minelem1.cpp.x" <20>
|
||||
"{ObjDir}minelem2.cpp.x" <20>
|
||||
"{ObjDir}minus.cpp.x" <20>
|
||||
"{ObjDir}mismtch0.cpp.x" <20>
|
||||
"{ObjDir}mismtch1.cpp.x" <20>
|
||||
"{ObjDir}mismtch2.cpp.x" <20>
|
||||
"{ObjDir}mkheap0.cpp.x" <20>
|
||||
"{ObjDir}mkheap1.cpp.x" <20>
|
||||
"{ObjDir}mmap1.cpp.x" <20>
|
||||
"{ObjDir}mmap2.cpp.x" <20>
|
||||
"{ObjDir}modulus.cpp.x" <20>
|
||||
"{ObjDir}mset1.cpp.x" <20>
|
||||
"{ObjDir}mset3.cpp.x" <20>
|
||||
"{ObjDir}mset4.cpp.x" <20>
|
||||
"{ObjDir}mset5.cpp.x" <20>
|
||||
"{ObjDir}negate.cpp.x" <20>
|
||||
"{ObjDir}nequal.cpp.x" <20>
|
||||
"{ObjDir}nextprm0.cpp.x" <20>
|
||||
"{ObjDir}nextprm1.cpp.x" <20>
|
||||
"{ObjDir}nextprm2.cpp.x" <20>
|
||||
"{ObjDir}nthelem0.cpp.x" <20>
|
||||
"{ObjDir}nthelem1.cpp.x" <20>
|
||||
"{ObjDir}nthelem2.cpp.x" <20>
|
||||
"{ObjDir}ostmit.cpp.x" <20>
|
||||
"{ObjDir}pair0.cpp.x" <20>
|
||||
"{ObjDir}pair1.cpp.x" <20>
|
||||
"{ObjDir}pair2.cpp.x" <20>
|
||||
"{ObjDir}parsrt0.cpp.x" <20>
|
||||
"{ObjDir}parsrt1.cpp.x" <20>
|
||||
"{ObjDir}parsrt2.cpp.x" <20>
|
||||
"{ObjDir}parsrtc0.cpp.x" <20>
|
||||
"{ObjDir}parsrtc1.cpp.x" <20>
|
||||
"{ObjDir}parsrtc2.cpp.x" <20>
|
||||
"{ObjDir}partsrt0.cpp.x" <20>
|
||||
"{ObjDir}partsum0.cpp.x" <20>
|
||||
"{ObjDir}partsum1.cpp.x" <20>
|
||||
"{ObjDir}partsum2.cpp.x" <20>
|
||||
"{ObjDir}pheap1.cpp.x" <20>
|
||||
"{ObjDir}pheap2.cpp.x" <20>
|
||||
"{ObjDir}plus.cpp.x" <20>
|
||||
"{ObjDir}pqueue1.cpp.x" <20>
|
||||
"{ObjDir}prevprm0.cpp.x" <20>
|
||||
"{ObjDir}prevprm1.cpp.x" <20>
|
||||
"{ObjDir}prevprm2.cpp.x" <20>
|
||||
"{ObjDir}ptition0.cpp.x" <20>
|
||||
"{ObjDir}ptition1.cpp.x" <20>
|
||||
"{ObjDir}ptrbinf1.cpp.x" <20>
|
||||
"{ObjDir}ptrbinf2.cpp.x" <20>
|
||||
"{ObjDir}ptrunf1.cpp.x" <20>
|
||||
"{ObjDir}ptrunf2.cpp.x" <20>
|
||||
"{ObjDir}queue1.cpp.x" <20>
|
||||
"{ObjDir}rawiter.cpp.x" <20>
|
||||
"{ObjDir}remcopy1.cpp.x" <20>
|
||||
"{ObjDir}remcpif1.cpp.x" <20>
|
||||
"{ObjDir}remif1.cpp.x" <20>
|
||||
"{ObjDir}remove1.cpp.x" <20>
|
||||
"{ObjDir}repcpif1.cpp.x" <20>
|
||||
"{ObjDir}replace0.cpp.x" <20>
|
||||
"{ObjDir}replace1.cpp.x" <20>
|
||||
"{ObjDir}replcpy1.cpp.x" <20>
|
||||
"{ObjDir}replif1.cpp.x" <20>
|
||||
"{ObjDir}revbit1.cpp.x" <20>
|
||||
"{ObjDir}revbit2.cpp.x" <20>
|
||||
"{ObjDir}revcopy1.cpp.x" <20>
|
||||
"{ObjDir}reverse1.cpp.x" <20>
|
||||
"{ObjDir}reviter1.cpp.x" <20>
|
||||
"{ObjDir}reviter2.cpp.x" <20>
|
||||
"{ObjDir}rndshuf0.cpp.x" <20>
|
||||
"{ObjDir}rndshuf1.cpp.x" <20>
|
||||
"{ObjDir}rndshuf2.cpp.x" <20>
|
||||
"{ObjDir}rotate0.cpp.x" <20>
|
||||
"{ObjDir}rotate1.cpp.x" <20>
|
||||
"{ObjDir}rotcopy0.cpp.x" <20>
|
||||
"{ObjDir}rotcopy1.cpp.x" <20>
|
||||
"{ObjDir}search0.cpp.x" <20>
|
||||
"{ObjDir}search1.cpp.x" <20>
|
||||
"{ObjDir}search2.cpp.x" <20>
|
||||
"{ObjDir}set1.cpp.x" <20>
|
||||
"{ObjDir}set2.cpp.x" <20>
|
||||
"{ObjDir}setdiff0.cpp.x" <20>
|
||||
"{ObjDir}setdiff1.cpp.x" <20>
|
||||
"{ObjDir}setdiff2.cpp.x" <20>
|
||||
"{ObjDir}setintr0.cpp.x" <20>
|
||||
"{ObjDir}setintr1.cpp.x" <20>
|
||||
"{ObjDir}setintr2.cpp.x" <20>
|
||||
"{ObjDir}setsymd0.cpp.x" <20>
|
||||
"{ObjDir}setsymd1.cpp.x" <20>
|
||||
"{ObjDir}setsymd2.cpp.x" <20>
|
||||
"{ObjDir}setunon0.cpp.x" <20>
|
||||
"{ObjDir}setunon1.cpp.x" <20>
|
||||
"{ObjDir}setunon2.cpp.x" <20>
|
||||
# "{ObjDir}single.cpp.x" <20>
|
||||
"{ObjDir}slist1.cpp.x" <20>
|
||||
"{ObjDir}sort1.cpp.x" <20>
|
||||
"{ObjDir}sort2.cpp.x" <20>
|
||||
"{ObjDir}stack1.cpp.x" <20>
|
||||
"{ObjDir}stack2.cpp.x" <20>
|
||||
# "{ObjDir}stat.cpp.x" <20>
|
||||
"{ObjDir}stblptn0.cpp.x" <20>
|
||||
"{ObjDir}stblptn1.cpp.x" <20>
|
||||
"{ObjDir}stblsrt1.cpp.x" <20>
|
||||
"{ObjDir}stblsrt2.cpp.x" <20>
|
||||
# "{ObjDir}stl_single.cpp.x" <20>
|
||||
"{ObjDir}stl_test.cpp.x" <20>
|
||||
"{ObjDir}string1.cpp.x" <20>
|
||||
"{ObjDir}swap1.cpp.x" <20>
|
||||
"{ObjDir}swprnge1.cpp.x" <20>
|
||||
"{ObjDir}times.cpp.x" <20>
|
||||
"{ObjDir}trnsfrm1.cpp.x" <20>
|
||||
"{ObjDir}trnsfrm2.cpp.x" <20>
|
||||
"{ObjDir}ucompos1.cpp.x" <20>
|
||||
"{ObjDir}ucompos2.cpp.x" <20>
|
||||
"{ObjDir}unegate1.cpp.x" <20>
|
||||
"{ObjDir}unegate2.cpp.x" <20>
|
||||
"{ObjDir}uniqcpy1.cpp.x" <20>
|
||||
"{ObjDir}uniqcpy2.cpp.x" <20>
|
||||
"{ObjDir}unique1.cpp.x" <20>
|
||||
"{ObjDir}unique2.cpp.x" <20>
|
||||
"{ObjDir}uprbnd1.cpp.x" <20>
|
||||
"{ObjDir}uprbnd2.cpp.x" <20>
|
||||
"{ObjDir}vec1.cpp.x" <20>
|
||||
"{ObjDir}vec2.cpp.x" <20>
|
||||
"{ObjDir}vec3.cpp.x" <20>
|
||||
"{ObjDir}vec4.cpp.x" <20>
|
||||
"{ObjDir}vec5.cpp.x" <20>
|
||||
"{ObjDir}vec6.cpp.x" <20>
|
||||
"{ObjDir}vec7.cpp.x" <20>
|
||||
"{ObjDir}vec8.cpp.x" <20>
|
||||
# end
|
||||
|
||||
Regression_test <EFBFBD><EFBFBD> setup
|
||||
Regression_test <EFBFBD><EFBFBD> "{ObjDir}"Regression_test.PPC
|
||||
echo "<22>n'{ObjDir}Regression_test.PPC' < '{stl}:test:regression:stdin' # execute it"
|
||||
|
||||
"{ObjDir}"Regression_test.PPC <EFBFBD><EFBFBD> {<EFBFBD>MondoBuild<EFBFBD>} {Regression_Objects_PPC} {Needed_SysLibs}
|
||||
###########
|
||||
if "{compile_status}"
|
||||
echo "### LINK NOT PERFORMED DUE TO COMPILE ERROR"
|
||||
exit "{compile_status}"
|
||||
end
|
||||
echo "<22>nLinking: {Targ}"
|
||||
if "`exists {Targ}`"
|
||||
delete {Targ} #*TY 01/14/1999 - it is faster to generate executable from the ground up than modifying the existing ones.
|
||||
end
|
||||
PPCLink <20>
|
||||
-t 'MPST' <20>
|
||||
-o {Targ} <20>
|
||||
{Regression_Objects_PPC} <20>
|
||||
{Needed_SysLibs} <20>
|
||||
{Link_options} <20>
|
||||
# end
|
||||
|
||||
|
||||
|
||||
##################################################################################
|
||||
# test:eh: build rule
|
||||
##################################################################################
|
||||
eh_Objects_PPC = <20>
|
||||
"{ObjDir}main.cpp.x" <20>
|
||||
"{ObjDir}nc_alloc.cpp.x" <20>
|
||||
"{ObjDir}random_number.cpp.x" <20>
|
||||
"{ObjDir}test_algo.cpp.x" <20>
|
||||
"{ObjDir}test_algobase.cpp.x" <20>
|
||||
"{ObjDir}test_bit_vector.cpp.x" <20>
|
||||
"{ObjDir}test_bitset.cpp.x" <20>
|
||||
"{ObjDir}test_deque.cpp.x" <20>
|
||||
"{ObjDir}test_hash_map.cpp.x" <20>
|
||||
"{ObjDir}test_hash_set.cpp.x" <20>
|
||||
"{ObjDir}test_list.cpp.x" <20>
|
||||
"{ObjDir}test_map.cpp.x" <20>
|
||||
"{ObjDir}test_rope.cpp.x" <20>
|
||||
"{ObjDir}test_set.cpp.x" <20>
|
||||
"{ObjDir}test_slist.cpp.x" <20>
|
||||
"{ObjDir}test_string.cpp.x" <20>
|
||||
"{ObjDir}test_valarray.cpp.x" <20>
|
||||
"{ObjDir}test_vector.cpp.x" <20>
|
||||
"{ObjDir}TestClass.cpp.x" <20>
|
||||
#end
|
||||
|
||||
EH_test <EFBFBD><EFBFBD> setup
|
||||
EH_test <EFBFBD><EFBFBD> "{ObjDir}"EH_test.PPC
|
||||
echo "<22>n'{ObjDir}EH_test.PPC' # execute it"
|
||||
|
||||
"{ObjDir}"EH_test.PPC <20><> "{stl}:test:regression:{<7B>MondoBuild<EFBFBD>}" {eh_Objects_PPC} {Needed_SysLibs}
|
||||
###########
|
||||
if "{compile_status}"
|
||||
echo "### LINK NOT PERFORMED DUE TO COMPILE TIME ERROR"
|
||||
exit "{compile_status}"
|
||||
end
|
||||
echo "<22>nLinking: {Targ}"
|
||||
if "`exists {Targ}`"
|
||||
delete {Targ}
|
||||
end
|
||||
PPCLink <20>
|
||||
-t 'MPST' <20>
|
||||
-o {Targ} <20>
|
||||
{eh_Objects_PPC} <20>
|
||||
{Link_options} <20>
|
||||
{Needed_SysLibs} <20>
|
||||
# end
|
||||
|
||||
65
STLPORT/test/regression/README.txt
Normal file
65
STLPORT/test/regression/README.txt
Normal file
@@ -0,0 +1,65 @@
|
||||
Test suite for SGI STL implementation
|
||||
|
||||
Boris P. Fomitchev <fbp@metabyte.com>
|
||||
|
||||
Last updated : Nov 14, 1997
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Preface
|
||||
|
||||
One of the problems one is faced when deciding whether using STL or not is
|
||||
the question of portability and reliability. It's not a rare case when
|
||||
compiler begins to crash when template constructs get too complex. While
|
||||
it's not possible to predict such effects on arbitrary code, it is often
|
||||
useful to test basic STL compatibility of the compiler. That's what this
|
||||
testsuite is for. It don't use too complex construct with STL items. But it
|
||||
do instantiate about every item to see if it works properly.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Genesis
|
||||
|
||||
This testsuite is derived from Cygnus Solutions STL testsuite, which is
|
||||
based on ObjectSpace STL examples. The changes that have been made mostly
|
||||
involve restructuring. You can run a single short test for particular STL
|
||||
construct , or try to compile them all and link to single executable. You
|
||||
may also test if your compiler can handle extremely long source files by
|
||||
compiling a single source including all others.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Platforms
|
||||
|
||||
Makefiles for gcc, SUNPro, Borland, Visual C++ compilers are provided with
|
||||
the suite. Look for .mak files in the distribution. It should be not
|
||||
difficult to adjust one of them to your compiler.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Trying it out
|
||||
|
||||
After unpacking, edit appropriate makefile to fit your compiler and include
|
||||
directories . After you've done, try "make check". This target is output
|
||||
(stl_test.out) of single executable containing all the tests. Compare it
|
||||
with stl_test.exp output (or stl_test.rand.exp, see below).
|
||||
There should be no differences. If some test fails
|
||||
to compile, you may try "make test_name.out" to produce single test
|
||||
executable and run it.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Expected differences
|
||||
|
||||
As many tests use pseudo-random generators, you may get differences
|
||||
in test output.
|
||||
Basically, there are 2 random generator scemes used :
|
||||
via rand() function : expected result in stl_test.rand.exp
|
||||
via lrand48() function : expected result in stl_test.exp.
|
||||
|
||||
System-dependent notices:
|
||||
If you are using STLport on OS390 machine, you should compare with stl_test.ibm390.exp.
|
||||
|
||||
Linux libc uses different random generator which doesn't match any of the above. Be prepared.
|
||||
|
||||
map1_test : some compilers don't zero-initialize data when builtin-type default constructor called, thus you may see some garbage instead of 0 in the output.
|
||||
356
STLPORT/test/regression/ReadMe.MPW
Normal file
356
STLPORT/test/regression/ReadMe.MPW
Normal file
@@ -0,0 +1,356 @@
|
||||
# MPW adaptation of STLport
|
||||
#
|
||||
# written by Tsutomu Yoshida, Minokamo, Japan. Aug/14/1998
|
||||
# #*TY 05/23/1999 - updated for STLport-3.2
|
||||
# #*TY 08/03/1999 - updated for STLport-3.2.1
|
||||
# #*TY 05/21/2000 - updated for STLport-4.0
|
||||
# #*TY 05/13/2001 - updated for STLport-4.1
|
||||
#
|
||||
# this document describes the detailed instructions for building and running the STL testsuite (regression and eh)
|
||||
# as the mpw tools, as well as building STLportLib which provides the standard conforming iostream.
|
||||
|
||||
|
||||
# *** IMPORTANT NOTES ON ENVIRONMENT CONFIGURATION
|
||||
#
|
||||
# <09> STLport under MPW expects CIncludes folder (or alias of it) be presented at the same level as "stlport" folder.
|
||||
# <09> C++ Compilers should be given the chance to search include files in "stlport" folder before searching in "CIncludes" folder.
|
||||
# <09> If you use old style STL header (i.e., map.h, etc.), "stoport:old_hp" folder also has to be added in the include
|
||||
# search paths (old style headers are not verified to work. use them on your own risk).
|
||||
# <09> This version of STLport uses <exception> header supplied with the package. <exception> supplied elsewhere is not used,
|
||||
# unlike the earlier version of STLport.
|
||||
# <09> You may have to increase the stack size of MPW shell since MrCpp's backend uses a lot of stack space for code optimization.
|
||||
# Use a shell command shown below.
|
||||
SetShellSize -s 1280k # relaunch of MPW shell required to take effect
|
||||
|
||||
|
||||
# *** how to setup STL under MPW environment:
|
||||
# ===============================================================================================================
|
||||
# (1) run the MPW script shown below to setup the shell variable {STL} to point to the STLport
|
||||
# directory. to run this script, open this file (ReadMe.MPW) under MPW and select the script block below
|
||||
# and then press "enter' key (not the 'return' key).
|
||||
#
|
||||
# Note: this setup script will install a startup script named "!STL_Folder_SetUp"
|
||||
# under "{ShellDirectory}Startup Items:" directory.
|
||||
#
|
||||
#(# INSTALL (1)
|
||||
begin
|
||||
unset STL # to unconditionally re-setup STL variable
|
||||
if !"{STL}"
|
||||
Set exit 0
|
||||
Set temp "{Boot}"
|
||||
unset STL
|
||||
if "{active}" =~ /(<28>)<29>1:<3A>/
|
||||
directory "{<7B>1}:"
|
||||
set temp "{<7B>1}:::"
|
||||
(Set temp `ResolveAlias "{temp}stlport:"`)<29>dev:null
|
||||
end
|
||||
Loop
|
||||
If !"`Exists "{temp}stl:_config.h"`"
|
||||
Alert "The folder you have chosen, <20>'{temp}<7D>', does not appear to be the correct STL folder."<22>
|
||||
"<22>nPlease choose the main STLport folder (the folder which contains stl_config.h)."
|
||||
Else
|
||||
Break
|
||||
End
|
||||
Set temp "`(GetFileName "{temp}" -q -d -m "Where is your <20>"STLport<72>" folder?")<29>dev:null`"
|
||||
exit if !"{temp}"
|
||||
End
|
||||
Set -e STL "{temp}"
|
||||
set STL > "{ShellDirectory}Startup Items:!STL_Folder_SetUp" # save the {STL} setting so that you do not have to run this script every time mpw is booted.
|
||||
unset temp
|
||||
Set exit 1
|
||||
else
|
||||
alert "the path to <20>"<22>{STL<54>}<7D>" has been set up as: <20>n'{STL}' .<2E>nMake sure this is up to date."
|
||||
end
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
# ===============================================================================================================
|
||||
# (2) make alias for the CIncludes folder at the same level as 'stlport' folder.
|
||||
#
|
||||
#(# INSTALL (2)
|
||||
begin
|
||||
SendAE -e "FNDRsali" -t "Finder" -----alis "{CIncludes}:CIncludes" <20>dev:null # create the alias
|
||||
set alias_ `exists -a "{CIncludes}:"<22>CIncludes<65>` # get the exact name for the alias
|
||||
duplicate -y "{alias_}" "{STL}:CIncludes" # copy it into the destination
|
||||
delete -ay "{alias_}" # clean up
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
# ===============================================================================================================
|
||||
# (3) OPTIONAL: change the creator of files to MPW, colorize them to Blue and set the default font information
|
||||
#
|
||||
# WARNING: THIS STEP IS QUITE TIME CONSUMING
|
||||
#
|
||||
#(# INSTALL (3) OPTIONAL
|
||||
begin
|
||||
set -e exit 0
|
||||
if !"{Font}";set -e Font "Monaco";end
|
||||
if !"{FontSize}";set -e FontSize 9;end
|
||||
set self_ "{active}"
|
||||
for f_ in `exists -f <20>
|
||||
"{stl}"[<5B>.]+ "{stl}"<22>.[hc]<5D> <20>
|
||||
"{stl}config:"<22>.[hc]<5D> <20>
|
||||
"{stl}old_hp:"<22>.[hc]<5D> <20>
|
||||
"{stl}stl:"[<5B>.]+ "{stl}stl:"<22>.[hc]<5D> <20>
|
||||
"{stl}stl:debug:"<22>.[hc]<5D> <20>
|
||||
"{stl}stl:wrappers:"<22>.[hc]<5D> <20>
|
||||
"{stl}wrap_std:"<22>[<5B>.]+ <20>
|
||||
"{stl}wrap_std:h:"<22>.[hc]<5D> <20>
|
||||
"{stl}using:"[<5B>.]+ <20>
|
||||
"{stl}using:h:"<22>.[hc]<5D> <20>
|
||||
"{stl}:src:"<22>.[hc]<5D> <20>
|
||||
"{stl}:test:regression:"<22>.[hc]<5D> <20>
|
||||
"{stl}:test:eh:"<22>.[hc]<5D> <20>
|
||||
`
|
||||
SetFile -a l "{f_}"
|
||||
Open -h -r "{f_}"
|
||||
Format -l 'C/C++/Objective-C' -f "{Font}" -s "{FontSize}" "{f_}"
|
||||
Close "{f_}"
|
||||
SetFile -c 'MPS ' -label 3 -a L "{f_}"
|
||||
end
|
||||
for f_ in `exists -f <20>
|
||||
"{stl}:src:"<22>.mak <20>
|
||||
"{stl}:test:regression:"<22>.mak <20>
|
||||
"{stl}:test:eh:"<22>.mak <20>
|
||||
`
|
||||
SetFile -a l "{f_}"
|
||||
Open -h -r "{f_}"
|
||||
Format -l 'MPW Shell Script' -f "{Font}" -s "{FontSize}" "{f_}"
|
||||
Close "{f_}"
|
||||
SetFile -c 'MPS ' -label 4 -a L "{f_}" # blue color
|
||||
end
|
||||
open "{self_}"
|
||||
SetFile -a l "{self_}"
|
||||
Format -l 'MPW Shell Script' -f "{Font}" -s "{FontSize}" "{self_}"
|
||||
SetFile -c 'MPS ' -label 6 "{self_}" # sky color
|
||||
set -e exit 1
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
# ===============================================================================================================
|
||||
# (4) build and install PPC version of STLportLib into "{stl}:lib:" folder. Both debugging and non-debugging versions will be built.
|
||||
#
|
||||
# target compiler: apple's mpw MrCpp 5.0.0 or better
|
||||
#
|
||||
#(# INSTALL (4) PPC STLportLib
|
||||
begin
|
||||
set -e MrCpp `which MrCpp` # ver.5.0.0 or better is required
|
||||
save -a # save all files (optional)
|
||||
directory "{stl}:src:" # setup the working directory
|
||||
target "{worksheet}"
|
||||
echo -n "<22>n####### START BUILDING PPC VERSION OF STLportLib LIBRARY ####### "; date -s
|
||||
unset fullbuild
|
||||
# set -e fullbuild "-e" # uncomment this line to force full build
|
||||
|
||||
for debug_build in '-d DEBUG' ''
|
||||
make {fullbuild} {debug_build} install -f "{stl}:src:MrCpp.mak" > MrCpp.MakeIt; execute MrCpp.MakeIt
|
||||
end
|
||||
echo "Finished building STLportLib (PPC)<29>n"
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
# ===============================================================================================================
|
||||
# (5) build and install 68K version of STLportLib into "{stl}:lib:" folder. Both debugging and non-debugging versions will be built.
|
||||
#
|
||||
# target compiler: apple's mpw SCpp 8.9.0 or better
|
||||
#
|
||||
#(# INSTALL (5) 68K STLportLib
|
||||
begin
|
||||
set -e SCpp `which SCpp` # ver.8.9.0 or better is required
|
||||
save -a # save all files (optional)
|
||||
directory "{stl}:src:" # setup the working directory
|
||||
target "{worksheet}"
|
||||
echo -n "<22>n####### START BUILDING 68K VERSION OF STLportLib LIBRARY ####### "; date -s
|
||||
unset fullbuild
|
||||
# set -e fullbuild "-e" # uncomment this line to force full build
|
||||
|
||||
set -e other_SCpp_Options "-seg STLPortLib"
|
||||
|
||||
for debug_build in '-d DEBUG' ''
|
||||
make {fullbuild} {debug_build} install -f "{stl}:src:SCpp.mak" > SCpp.MakeIt; execute SCpp.MakeIt
|
||||
end
|
||||
unset other_SCpp_Options
|
||||
echo "Finished building STLportLib (68K)<29>n"
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# *** how to try out the regression testsuite (PPC version):
|
||||
# ===============================================================================================================
|
||||
# target compiler: apple's mpw MrCpp 5.0.0
|
||||
#
|
||||
# (1) run the shell script listed below to compile and link the PPC version of testsuite as the mpw
|
||||
# tool by selecting it and press enter.
|
||||
#
|
||||
#(# PPC (1) Regression Build
|
||||
begin
|
||||
set -e MrCpp `which MrCpp` # ver.5.0.0 or better is required
|
||||
save -a # save all files (optional)
|
||||
directory "{stl}:test:regression:" # setup the working directory
|
||||
target "{worksheet}"
|
||||
echo -n "<22>n####### START BUILDING PPC VERSION OF STL REGRESSION TEST SUITE ####### "; date -s
|
||||
unset other_STL_Options
|
||||
unset other_MrCpp_Options
|
||||
unset fullbuild
|
||||
# set -e fullbuild "-e" # uncomment this line to force full build
|
||||
unset debug_build
|
||||
set -e debug_build '-d DEBUG' # uncomment this line to build non-debug version
|
||||
make -w {fullbuild} {debug_build} Regression_test -f "{stl}:test:regression:MrCpp.mak" > MrCpp.MakeIt
|
||||
set -e exit 0
|
||||
execute MrCpp.MakeIt
|
||||
set -e exit 1
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
# (2) run the shell script listed below to execute the PPC version of testsuite mpw tool and
|
||||
# compare the output with the standard "stl_test.exp" output.
|
||||
#
|
||||
#(# PPC (2)
|
||||
set proj "{stl}:test:regression:"
|
||||
set obj "{proj}.PPC.DBG:"
|
||||
set Regression_test.PPC.output "{obj}"MrCpp.exp # output to separate file
|
||||
#set Regression_test.PPC.output "dev:stdout" # output to {worksheet}
|
||||
directory "{proj}"
|
||||
target "{worksheet}"
|
||||
begin
|
||||
echo 'a string' > "{proj}"stdin # prepare input
|
||||
echo "###### START: Regression_test.PPC"
|
||||
"{obj}"Regression_test.PPC < "{proj}"stdin > "{Regression_test.PPC.output}" # run
|
||||
echo "###### FINISHED: Regression_test.PPC"
|
||||
end <20><> "{worksheet}"
|
||||
if "{Regression_test.PPC.output}" != "dev:stdout"
|
||||
set exit 0
|
||||
comparefiles "{Regression_test.PPC.output}" "{proj}"stl_test.exp # compare output file
|
||||
set exit 1
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
# *** how to try out the EH testsuite (PPC version):
|
||||
# ===============================================================================================================
|
||||
# target compiler: apple's mpw MrCpp 5.0.0
|
||||
#
|
||||
# (3) run the shell script listed below to compile and link the PPC version of testsuite as the mpw
|
||||
# tool by selecting it and press enter.
|
||||
#
|
||||
# Note: MrCpp and SCpp still can not pass all eh tests. You will get failed assertion when run the test.
|
||||
#
|
||||
#(# PPC (3)
|
||||
begin
|
||||
set -e MrCpp `which MrCpp` # ver.5.0.0 or better is required
|
||||
save -a # save all files (optional)
|
||||
directory "{stl}:test:eh:" # setup the working directory
|
||||
target "{worksheet}"
|
||||
echo -n "<22>n####### START BUILDING PPC VERSION OF STL EH TEST SUITE ####### "; date -s
|
||||
unset other_STL_Options
|
||||
unset other_MrCpp_Options
|
||||
unset fullbuild
|
||||
# set -e fullbuild "-e" # uncomment this line to force full build
|
||||
unset debug_build
|
||||
# set -e debug_build '-d DEBUG' # debug flavor can not pass the eh test yet.
|
||||
make -w {fullbuild} {debug_build} EH_test -f "{stl}:test:regression:MrCpp.mak" > MrCpp.MakeIt
|
||||
set -e exit 0
|
||||
execute MrCpp.MakeIt
|
||||
set -e exit 1
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# *** how to try out the testsuite (68K version):
|
||||
# ===============================================================================================================
|
||||
# target compiler: apple's mpw SCpp 8.9.0
|
||||
#
|
||||
# (1) run the shell script listed below to compile and link the 68K version of testsuite as the mpw
|
||||
# tool by selecting it and press enter.
|
||||
#
|
||||
#(# 68K (1)
|
||||
begin
|
||||
set SCpp `which SCpp` # ver.8.9.0 or better is required
|
||||
save -a # save all files (optional)
|
||||
directory "{stl}:test:regression:" # setup the working directory
|
||||
target "{worksheet}"
|
||||
echo -n "<22>n####### START BUILDING 68K VERSION OF STL REGRESSION TEST SUITE ####### "; date -s
|
||||
unset other_STL_Options
|
||||
unset other_SCpp_Options
|
||||
unset fullbuild
|
||||
# set fullbuild "-e" # uncomment this line to force full build
|
||||
unset debug_build
|
||||
set -e debug_build '-d DEBUG' # uncomment this line to build non-debug version
|
||||
set -e other_SCpp_Options "-model far"
|
||||
make -w {fullbuild} {debug_build} Regression_test -f "{stl}:test:regression:SCpp.mak" > SCpp.MakeIt
|
||||
set -e exit 0
|
||||
execute SCpp.MakeIt
|
||||
set -e exit 1
|
||||
unset other_SCpp_Options
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
# (2) run the shell script listed below to execute the 68K version of testsuite mpw tool and
|
||||
# compare the output with the standard "stl_test.exp" output.
|
||||
#
|
||||
#(# 68K (2)
|
||||
set -e proj "{stl}:test:regression:"
|
||||
set -e obj "{proj}.68K.DBG:"
|
||||
set Regression_test.68K.output "{obj}"SCpp.exp # output to separate file
|
||||
#set Regression_test.68K.output "dev:stdout" # output to {worksheet}
|
||||
if "{active}" =~ /(<28>)<29>1:<3A>/
|
||||
directory "{<7B>1}:" # setup the working directory
|
||||
end
|
||||
target "{worksheet}"
|
||||
begin
|
||||
echo 'a string' > "{proj}"stdin # prepare input
|
||||
echo "###### START: Regression_test.68K"
|
||||
"{obj}"Regression_test.68K < "{proj}"stdin > "{Regression_test.68K.output}" # run
|
||||
echo "###### FINISHED: Regression_test.68K"
|
||||
end <20><> "{worksheet}"
|
||||
if "{Regression_test.68K.output}" != "dev:stdout"
|
||||
set exit 0
|
||||
comparefiles "{Regression_test.68K.output}" "{proj}"stl_test.exp # compare output file
|
||||
set exit 1
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
# *** how to try out the eh testsuite (68K version):
|
||||
# ===============================================================================================================
|
||||
# target compiler: apple's mpw SCpp 8.9.0
|
||||
#
|
||||
# (1) run the shell script listed below to compile and link the 68K version of testsuite as the mpw
|
||||
# tool by selecting it and press enter.
|
||||
#
|
||||
# Note: MrCpp and SCpp still can not pass all eh tests. You will get failed assertion when run the test.
|
||||
#
|
||||
#(# 68K (1)
|
||||
begin
|
||||
set SCpp `which SCpp` # ver.8.9.0 or better is required
|
||||
save -a # save all files (optional)
|
||||
directory "{stl}:test:eh:" # setup the working directory
|
||||
target "{worksheet}"
|
||||
echo -n "<22>n####### START BUILDING 68K VERSION OF STL EH TEST SUITE ####### "; date -s
|
||||
unset other_STL_Options
|
||||
unset other_SCpp_Options
|
||||
unset fullbuild
|
||||
# set fullbuild "-e" # uncomment this line to force full build
|
||||
unset debug_build
|
||||
set -e debug_build '-d DEBUG'
|
||||
set -e other_SCpp_Options "-model far"
|
||||
make -w {fullbuild} {debug_build} EH_test -f "{stl}:test:regression:SCpp.mak" > SCpp.MakeIt
|
||||
set -e exit 0
|
||||
execute SCpp.MakeIt
|
||||
set -e exit 1
|
||||
end <20><> "{worksheet}"
|
||||
#)#
|
||||
|
||||
|
||||
# - end of ReadMe.MPW
|
||||
998
STLPORT/test/regression/SCpp.mak
Normal file
998
STLPORT/test/regression/SCpp.mak
Normal file
@@ -0,0 +1,998 @@
|
||||
!include "{stl}:src:SCpp.mak"
|
||||
|
||||
MAKEFILE = SCpp.mak
|
||||
|
||||
|
||||
Needed_SysLibs = <20>
|
||||
# "{CLibraries}IOStreams.o" <20>
|
||||
"{STL}:lib:STLportLib{config_}.o" <20>
|
||||
"{Libraries}Stubs.o" <20>
|
||||
"{Libraries}MathLib.o" <20>
|
||||
"{CLibraries}CPlusLib.o" <20>
|
||||
"{CLibraries}StdCLib.o" <20>
|
||||
"{Libraries}MacRuntime.o" <20>
|
||||
"{Libraries}IntEnv.o" <20>
|
||||
#"{Libraries}ToolLibs.o" <20>
|
||||
"{Libraries}Interface.o" <20>
|
||||
# end
|
||||
|
||||
|
||||
##################################################################################
|
||||
# test:regression: build rule
|
||||
##################################################################################
|
||||
Regression_Objects_68K = <20>
|
||||
"{ObjDir}accum1.cpp.o" <20>
|
||||
"{ObjDir}accum2.cpp.o" <20>
|
||||
"{ObjDir}adjdiff0.cpp.o" <20>
|
||||
"{ObjDir}adjdiff1.cpp.o" <20>
|
||||
"{ObjDir}adjdiff2.cpp.o" <20>
|
||||
"{ObjDir}adjfind0.cpp.o" <20>
|
||||
"{ObjDir}adjfind1.cpp.o" <20>
|
||||
"{ObjDir}adjfind2.cpp.o" <20>
|
||||
"{ObjDir}advance.cpp.o" <20>
|
||||
"{ObjDir}alg1.cpp.o" <20>
|
||||
"{ObjDir}alg2.cpp.o" <20>
|
||||
"{ObjDir}alg3.cpp.o" <20>
|
||||
"{ObjDir}alg4.cpp.o" <20>
|
||||
"{ObjDir}alg5.cpp.o" <20>
|
||||
"{ObjDir}bcompos1.cpp.o" <20>
|
||||
"{ObjDir}bcompos2.cpp.o" <20>
|
||||
"{ObjDir}bind1st1.cpp.o" <20>
|
||||
"{ObjDir}bind1st2.cpp.o" <20>
|
||||
"{ObjDir}bind2nd1.cpp.o" <20>
|
||||
"{ObjDir}bind2nd2.cpp.o" <20>
|
||||
"{ObjDir}binsert1.cpp.o" <20>
|
||||
"{ObjDir}binsert2.cpp.o" <20>
|
||||
"{ObjDir}binsrch1.cpp.o" <20>
|
||||
"{ObjDir}binsrch2.cpp.o" <20>
|
||||
"{ObjDir}bitset1.cpp.o" <20>
|
||||
"{ObjDir}bnegate1.cpp.o" <20>
|
||||
"{ObjDir}bnegate2.cpp.o" <20>
|
||||
"{ObjDir}bvec1.cpp.o" <20>
|
||||
"{ObjDir}copy1.cpp.o" <20>
|
||||
"{ObjDir}copy2.cpp.o" <20>
|
||||
"{ObjDir}copy3.cpp.o" <20>
|
||||
"{ObjDir}copy4.cpp.o" <20>
|
||||
"{ObjDir}copyb.cpp.o" <20>
|
||||
"{ObjDir}copyb0.cpp.o" <20>
|
||||
"{ObjDir}count0.cpp.o" <20>
|
||||
"{ObjDir}count1.cpp.o" <20>
|
||||
"{ObjDir}countif1.cpp.o" <20>
|
||||
"{ObjDir}deque1.cpp.o" <20>
|
||||
"{ObjDir}divides.cpp.o" <20>
|
||||
"{ObjDir}eqlrnge0.cpp.o" <20>
|
||||
"{ObjDir}eqlrnge1.cpp.o" <20>
|
||||
"{ObjDir}eqlrnge2.cpp.o" <20>
|
||||
"{ObjDir}equal0.cpp.o" <20>
|
||||
"{ObjDir}equal1.cpp.o" <20>
|
||||
"{ObjDir}equal2.cpp.o" <20>
|
||||
"{ObjDir}equalto.cpp.o" <20>
|
||||
"{ObjDir}fill1.cpp.o" <20>
|
||||
"{ObjDir}filln1.cpp.o" <20>
|
||||
"{ObjDir}find0.cpp.o" <20>
|
||||
"{ObjDir}find1.cpp.o" <20>
|
||||
"{ObjDir}findif0.cpp.o" <20>
|
||||
"{ObjDir}findif1.cpp.o" <20>
|
||||
"{ObjDir}finsert1.cpp.o" <20>
|
||||
"{ObjDir}finsert2.cpp.o" <20>
|
||||
"{ObjDir}foreach0.cpp.o" <20>
|
||||
"{ObjDir}foreach1.cpp.o" <20>
|
||||
"{ObjDir}func1.cpp.o" <20>
|
||||
"{ObjDir}func2.cpp.o" <20>
|
||||
"{ObjDir}func3.cpp.o" <20>
|
||||
"{ObjDir}gener1.cpp.o" <20>
|
||||
"{ObjDir}gener2.cpp.o" <20>
|
||||
"{ObjDir}genern1.cpp.o" <20>
|
||||
"{ObjDir}genern2.cpp.o" <20>
|
||||
"{ObjDir}greateq.cpp.o" <20>
|
||||
"{ObjDir}greater.cpp.o" <20>
|
||||
"{ObjDir}hmap1.cpp.o" <20>
|
||||
"{ObjDir}hmmap1.cpp.o" <20>
|
||||
"{ObjDir}hmset1.cpp.o" <20>
|
||||
"{ObjDir}hset2.cpp.o" <20>
|
||||
"{ObjDir}incl0.cpp.o" <20>
|
||||
"{ObjDir}incl1.cpp.o" <20>
|
||||
"{ObjDir}incl2.cpp.o" <20>
|
||||
"{ObjDir}inplmrg1.cpp.o" <20>
|
||||
"{ObjDir}inplmrg2.cpp.o" <20>
|
||||
"{ObjDir}inrprod0.cpp.o" <20>
|
||||
"{ObjDir}inrprod1.cpp.o" <20>
|
||||
"{ObjDir}inrprod2.cpp.o" <20>
|
||||
"{ObjDir}insert1.cpp.o" <20>
|
||||
"{ObjDir}insert2.cpp.o" <20>
|
||||
"{ObjDir}iota1.cpp.o" <20>
|
||||
"{ObjDir}istmit1.cpp.o" <20>
|
||||
"{ObjDir}iter1.cpp.o" <20>
|
||||
"{ObjDir}iter2.cpp.o" <20>
|
||||
"{ObjDir}iter3.cpp.o" <20>
|
||||
"{ObjDir}iter4.cpp.o" <20>
|
||||
"{ObjDir}iterswp0.cpp.o" <20>
|
||||
"{ObjDir}iterswp1.cpp.o" <20>
|
||||
"{ObjDir}less.cpp.o" <20>
|
||||
"{ObjDir}lesseq.cpp.o" <20>
|
||||
"{ObjDir}lexcmp1.cpp.o" <20>
|
||||
"{ObjDir}lexcmp2.cpp.o" <20>
|
||||
"{ObjDir}list1.cpp.o" <20>
|
||||
"{ObjDir}list2.cpp.o" <20>
|
||||
"{ObjDir}list3.cpp.o" <20>
|
||||
"{ObjDir}list4.cpp.o" <20>
|
||||
"{ObjDir}logicand.cpp.o" <20>
|
||||
"{ObjDir}logicnot.cpp.o" <20>
|
||||
"{ObjDir}logicor.cpp.o" <20>
|
||||
"{ObjDir}lwrbnd1.cpp.o" <20>
|
||||
"{ObjDir}lwrbnd2.cpp.o" <20>
|
||||
"{ObjDir}map1.cpp.o" <20>
|
||||
"{ObjDir}max1.cpp.o" <20>
|
||||
"{ObjDir}max2.cpp.o" <20>
|
||||
"{ObjDir}maxelem1.cpp.o" <20>
|
||||
"{ObjDir}maxelem2.cpp.o" <20>
|
||||
"{ObjDir}merge0.cpp.o" <20>
|
||||
"{ObjDir}merge1.cpp.o" <20>
|
||||
"{ObjDir}merge2.cpp.o" <20>
|
||||
"{ObjDir}min1.cpp.o" <20>
|
||||
"{ObjDir}min2.cpp.o" <20>
|
||||
"{ObjDir}minelem1.cpp.o" <20>
|
||||
"{ObjDir}minelem2.cpp.o" <20>
|
||||
"{ObjDir}minus.cpp.o" <20>
|
||||
"{ObjDir}mismtch0.cpp.o" <20>
|
||||
"{ObjDir}mismtch1.cpp.o" <20>
|
||||
"{ObjDir}mismtch2.cpp.o" <20>
|
||||
"{ObjDir}mkheap0.cpp.o" <20>
|
||||
"{ObjDir}mkheap1.cpp.o" <20>
|
||||
"{ObjDir}mmap1.cpp.o" <20>
|
||||
"{ObjDir}mmap2.cpp.o" <20>
|
||||
"{ObjDir}modulus.cpp.o" <20>
|
||||
"{ObjDir}mset1.cpp.o" <20>
|
||||
"{ObjDir}mset3.cpp.o" <20>
|
||||
"{ObjDir}mset4.cpp.o" <20>
|
||||
"{ObjDir}mset5.cpp.o" <20>
|
||||
"{ObjDir}negate.cpp.o" <20>
|
||||
"{ObjDir}nequal.cpp.o" <20>
|
||||
"{ObjDir}nextprm0.cpp.o" <20>
|
||||
"{ObjDir}nextprm1.cpp.o" <20>
|
||||
"{ObjDir}nextprm2.cpp.o" <20>
|
||||
"{ObjDir}nthelem0.cpp.o" <20>
|
||||
"{ObjDir}nthelem1.cpp.o" <20>
|
||||
"{ObjDir}nthelem2.cpp.o" <20>
|
||||
"{ObjDir}ostmit.cpp.o" <20>
|
||||
"{ObjDir}pair0.cpp.o" <20>
|
||||
"{ObjDir}pair1.cpp.o" <20>
|
||||
"{ObjDir}pair2.cpp.o" <20>
|
||||
"{ObjDir}parsrt0.cpp.o" <20>
|
||||
"{ObjDir}parsrt1.cpp.o" <20>
|
||||
"{ObjDir}parsrt2.cpp.o" <20>
|
||||
"{ObjDir}parsrtc0.cpp.o" <20>
|
||||
"{ObjDir}parsrtc1.cpp.o" <20>
|
||||
"{ObjDir}parsrtc2.cpp.o" <20>
|
||||
"{ObjDir}partsrt0.cpp.o" <20>
|
||||
"{ObjDir}partsum0.cpp.o" <20>
|
||||
"{ObjDir}partsum1.cpp.o" <20>
|
||||
"{ObjDir}partsum2.cpp.o" <20>
|
||||
"{ObjDir}pheap1.cpp.o" <20>
|
||||
"{ObjDir}pheap2.cpp.o" <20>
|
||||
"{ObjDir}plus.cpp.o" <20>
|
||||
"{ObjDir}pqueue1.cpp.o" <20>
|
||||
"{ObjDir}prevprm0.cpp.o" <20>
|
||||
"{ObjDir}prevprm1.cpp.o" <20>
|
||||
"{ObjDir}prevprm2.cpp.o" <20>
|
||||
"{ObjDir}ptition0.cpp.o" <20>
|
||||
"{ObjDir}ptition1.cpp.o" <20>
|
||||
"{ObjDir}ptrbinf1.cpp.o" <20>
|
||||
"{ObjDir}ptrbinf2.cpp.o" <20>
|
||||
"{ObjDir}ptrunf1.cpp.o" <20>
|
||||
"{ObjDir}ptrunf2.cpp.o" <20>
|
||||
"{ObjDir}queue1.cpp.o" <20>
|
||||
"{ObjDir}rawiter.cpp.o" <20>
|
||||
"{ObjDir}remcopy1.cpp.o" <20>
|
||||
"{ObjDir}remcpif1.cpp.o" <20>
|
||||
"{ObjDir}remif1.cpp.o" <20>
|
||||
"{ObjDir}remove1.cpp.o" <20>
|
||||
"{ObjDir}repcpif1.cpp.o" <20>
|
||||
"{ObjDir}replace0.cpp.o" <20>
|
||||
"{ObjDir}replace1.cpp.o" <20>
|
||||
"{ObjDir}replcpy1.cpp.o" <20>
|
||||
"{ObjDir}replif1.cpp.o" <20>
|
||||
"{ObjDir}revbit1.cpp.o" <20>
|
||||
"{ObjDir}revbit2.cpp.o" <20>
|
||||
"{ObjDir}revcopy1.cpp.o" <20>
|
||||
"{ObjDir}reverse1.cpp.o" <20>
|
||||
"{ObjDir}reviter1.cpp.o" <20>
|
||||
"{ObjDir}reviter2.cpp.o" <20>
|
||||
"{ObjDir}rndshuf0.cpp.o" <20>
|
||||
"{ObjDir}rndshuf1.cpp.o" <20>
|
||||
"{ObjDir}rndshuf2.cpp.o" <20>
|
||||
"{ObjDir}rotate0.cpp.o" <20>
|
||||
"{ObjDir}rotate1.cpp.o" <20>
|
||||
"{ObjDir}rotcopy0.cpp.o" <20>
|
||||
"{ObjDir}rotcopy1.cpp.o" <20>
|
||||
"{ObjDir}search0.cpp.o" <20>
|
||||
"{ObjDir}search1.cpp.o" <20>
|
||||
"{ObjDir}search2.cpp.o" <20>
|
||||
"{ObjDir}set1.cpp.o" <20>
|
||||
"{ObjDir}set2.cpp.o" <20>
|
||||
"{ObjDir}setdiff0.cpp.o" <20>
|
||||
"{ObjDir}setdiff1.cpp.o" <20>
|
||||
"{ObjDir}setdiff2.cpp.o" <20>
|
||||
"{ObjDir}setintr0.cpp.o" <20>
|
||||
"{ObjDir}setintr1.cpp.o" <20>
|
||||
"{ObjDir}setintr2.cpp.o" <20>
|
||||
"{ObjDir}setsymd0.cpp.o" <20>
|
||||
"{ObjDir}setsymd1.cpp.o" <20>
|
||||
"{ObjDir}setsymd2.cpp.o" <20>
|
||||
"{ObjDir}setunon0.cpp.o" <20>
|
||||
"{ObjDir}setunon1.cpp.o" <20>
|
||||
"{ObjDir}setunon2.cpp.o" <20>
|
||||
# "{ObjDir}single.cpp.o" <20>
|
||||
"{ObjDir}slist1.cpp.o" <20>
|
||||
"{ObjDir}sort1.cpp.o" <20>
|
||||
"{ObjDir}sort2.cpp.o" <20>
|
||||
"{ObjDir}stack1.cpp.o" <20>
|
||||
"{ObjDir}stack2.cpp.o" <20>
|
||||
# "{ObjDir}stat.cpp.o" <20>
|
||||
"{ObjDir}stblptn0.cpp.o" <20>
|
||||
"{ObjDir}stblptn1.cpp.o" <20>
|
||||
"{ObjDir}stblsrt1.cpp.o" <20>
|
||||
"{ObjDir}stblsrt2.cpp.o" <20>
|
||||
# "{ObjDir}stl_single.cpp.o" <20>
|
||||
"{ObjDir}stl_test.cpp.o" <20>
|
||||
"{ObjDir}string1.cpp.o" <20>
|
||||
"{ObjDir}swap1.cpp.o" <20>
|
||||
"{ObjDir}swprnge1.cpp.o" <20>
|
||||
"{ObjDir}times.cpp.o" <20>
|
||||
"{ObjDir}trnsfrm1.cpp.o" <20>
|
||||
"{ObjDir}trnsfrm2.cpp.o" <20>
|
||||
"{ObjDir}ucompos1.cpp.o" <20>
|
||||
"{ObjDir}ucompos2.cpp.o" <20>
|
||||
"{ObjDir}unegate1.cpp.o" <20>
|
||||
"{ObjDir}unegate2.cpp.o" <20>
|
||||
"{ObjDir}uniqcpy1.cpp.o" <20>
|
||||
"{ObjDir}uniqcpy2.cpp.o" <20>
|
||||
"{ObjDir}unique1.cpp.o" <20>
|
||||
"{ObjDir}unique2.cpp.o" <20>
|
||||
"{ObjDir}uprbnd1.cpp.o" <20>
|
||||
"{ObjDir}uprbnd2.cpp.o" <20>
|
||||
"{ObjDir}vec1.cpp.o" <20>
|
||||
"{ObjDir}vec2.cpp.o" <20>
|
||||
"{ObjDir}vec3.cpp.o" <20>
|
||||
"{ObjDir}vec4.cpp.o" <20>
|
||||
"{ObjDir}vec5.cpp.o" <20>
|
||||
"{ObjDir}vec6.cpp.o" <20>
|
||||
"{ObjDir}vec7.cpp.o" <20>
|
||||
"{ObjDir}vec8.cpp.o" <20>
|
||||
# end
|
||||
|
||||
|
||||
Regression_test <EFBFBD><EFBFBD> setup
|
||||
Regression_test <EFBFBD><EFBFBD> "{ObjDir}"Regression_test.68K
|
||||
echo "<22>n'{ObjDir}Regression_test.68K' < '{stl}:test:regression:stdin' # execute it"
|
||||
|
||||
"{ObjDir}"Regression_test.68K <EFBFBD><EFBFBD> {<EFBFBD>MondoBuild<EFBFBD>} {Regression_Objects_68K} {Needed_SysLibs}
|
||||
###########
|
||||
if "{compile_status}"
|
||||
echo "### LINK NOT PERFORMED DUE TO COMPILE ERROR"
|
||||
exit "{compile_status}"
|
||||
end
|
||||
echo <20>n<EFBFBD>nLinking: "{Targ}"
|
||||
ILink <20>
|
||||
#Link <20>
|
||||
-t 'MPST' <20>
|
||||
-o {Targ} <20>
|
||||
{Regression_Objects_68K} <20>
|
||||
{Link_options} <20>
|
||||
{Needed_SysLibs} <20>
|
||||
# end
|
||||
|
||||
|
||||
##################################################################################
|
||||
# test:eh: build rule
|
||||
##################################################################################
|
||||
eh_Objects_68K = <20>
|
||||
"{ObjDir}main.cpp.o" <20>
|
||||
"{ObjDir}nc_alloc.cpp.o" <20>
|
||||
"{ObjDir}random_number.cpp.o" <20>
|
||||
"{ObjDir}test_algo.cpp.o" <20>
|
||||
"{ObjDir}test_algobase.cpp.o" <20>
|
||||
"{ObjDir}test_bit_vector.cpp.o" <20>
|
||||
"{ObjDir}test_bitset.cpp.o" <20>
|
||||
"{ObjDir}test_deque.cpp.o" <20>
|
||||
"{ObjDir}test_hash_map.cpp.o" <20>
|
||||
"{ObjDir}test_hash_set.cpp.o" <20>
|
||||
"{ObjDir}test_list.cpp.o" <20>
|
||||
"{ObjDir}test_map.cpp.o" <20>
|
||||
"{ObjDir}test_rope.cpp.o" <20>
|
||||
"{ObjDir}test_set.cpp.o" <20>
|
||||
"{ObjDir}test_slist.cpp.o" <20>
|
||||
"{ObjDir}test_string.cpp.o" <20>
|
||||
"{ObjDir}test_valarray.cpp.o" <20>
|
||||
"{ObjDir}test_vector.cpp.o" <20>
|
||||
"{ObjDir}TestClass.cpp.o" <20>
|
||||
#end
|
||||
|
||||
EH_test <EFBFBD><EFBFBD> setup
|
||||
EH_test <EFBFBD><EFBFBD> "{ObjDir}"EH_test.68K
|
||||
echo "<22>n'{ObjDir}EH_test.68K' # execute it"
|
||||
|
||||
|
||||
"{ObjDir}"EH_test.68K <20><> "{stl}:test:regression:{<7B>MondoBuild<EFBFBD>}" {eh_Objects_68K} {Needed_SysLibs}
|
||||
###########
|
||||
if "{compile_status}"
|
||||
echo "### LINK NOT PERFORMED DUE TO COMPILE TIME ERROR"
|
||||
exit "{compile_status}"
|
||||
end
|
||||
echo <20>n<EFBFBD>nLinking: "{Targ}"
|
||||
ILink <20>
|
||||
#Link <20>
|
||||
-t 'MPST' <20>
|
||||
-o {Targ} <20>
|
||||
{eh_Objects_68K} <20>
|
||||
{Link_options} <20>
|
||||
{Needed_SysLibs} <20>
|
||||
# end
|
||||
|
||||
|
||||
=======
|
||||
!include "{stl}:src:SCpp.mak"
|
||||
|
||||
|
||||
|
||||
MAKEFILE = SCpp.mak
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Needed_SysLibs = <20>
|
||||
|
||||
# "{CLibraries}IOStreams.o" <20>
|
||||
|
||||
"{STL}:lib:STLportLib{config_}.o" <20>
|
||||
|
||||
"{Libraries}Stubs.o" <20>
|
||||
|
||||
"{Libraries}MathLib.o" <20>
|
||||
|
||||
"{CLibraries}CPlusLib.o" <20>
|
||||
|
||||
"{CLibraries}StdCLib.o" <20>
|
||||
|
||||
"{Libraries}MacRuntime.o" <20>
|
||||
|
||||
"{Libraries}IntEnv.o" <20>
|
||||
|
||||
#"{Libraries}ToolLibs.o" <20>
|
||||
|
||||
"{Libraries}Interface.o" <20>
|
||||
|
||||
# end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##################################################################################
|
||||
|
||||
# test:regression: build rule
|
||||
|
||||
##################################################################################
|
||||
|
||||
Regression_Objects_68K = <20>
|
||||
|
||||
"{ObjDir}accum1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}accum2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}adjdiff0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}adjdiff1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}adjdiff2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}adjfind0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}adjfind1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}adjfind2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}advance.cpp.o" <20>
|
||||
|
||||
"{ObjDir}alg1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}alg2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}alg3.cpp.o" <20>
|
||||
|
||||
"{ObjDir}alg4.cpp.o" <20>
|
||||
|
||||
"{ObjDir}alg5.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bcompos1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bcompos2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bind1st1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bind1st2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bind2nd1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bind2nd2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}binsert1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}binsert2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}binsrch1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}binsrch2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bitset1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bnegate1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bnegate2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}bvec1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}copy1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}copy2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}copy3.cpp.o" <20>
|
||||
|
||||
"{ObjDir}copy4.cpp.o" <20>
|
||||
|
||||
"{ObjDir}copyb.cpp.o" <20>
|
||||
|
||||
"{ObjDir}copyb0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}count0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}count1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}countif1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}deque1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}divides.cpp.o" <20>
|
||||
|
||||
"{ObjDir}eqlrnge0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}eqlrnge1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}eqlrnge2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}equal0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}equal1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}equal2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}equalto.cpp.o" <20>
|
||||
|
||||
"{ObjDir}fill1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}filln1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}find0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}find1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}findif0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}findif1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}finsert1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}finsert2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}foreach0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}foreach1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}func1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}func2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}func3.cpp.o" <20>
|
||||
|
||||
"{ObjDir}gener1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}gener2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}genern1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}genern2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}greateq.cpp.o" <20>
|
||||
|
||||
"{ObjDir}greater.cpp.o" <20>
|
||||
|
||||
"{ObjDir}hmap1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}hmmap1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}hmset1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}hset2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}incl0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}incl1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}incl2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}inplmrg1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}inplmrg2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}inrprod0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}inrprod1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}inrprod2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}insert1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}insert2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}iota1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}istmit1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}iter1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}iter2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}iter3.cpp.o" <20>
|
||||
|
||||
"{ObjDir}iter4.cpp.o" <20>
|
||||
|
||||
"{ObjDir}iterswp0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}iterswp1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}less.cpp.o" <20>
|
||||
|
||||
"{ObjDir}lesseq.cpp.o" <20>
|
||||
|
||||
"{ObjDir}lexcmp1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}lexcmp2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}list1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}list2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}list3.cpp.o" <20>
|
||||
|
||||
"{ObjDir}list4.cpp.o" <20>
|
||||
|
||||
"{ObjDir}logicand.cpp.o" <20>
|
||||
|
||||
"{ObjDir}logicnot.cpp.o" <20>
|
||||
|
||||
"{ObjDir}logicor.cpp.o" <20>
|
||||
|
||||
"{ObjDir}lwrbnd1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}lwrbnd2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}map1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}max1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}max2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}maxelem1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}maxelem2.cpp.o" <20>
|
||||
"{ObjDir}memfunptr.cpp.o" <20>
|
||||
"{ObjDir}merge0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}merge1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}merge2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}min1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}min2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}minelem1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}minelem2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}minus.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mismtch0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mismtch1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mismtch2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mkheap0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mkheap1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mmap1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mmap2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}modulus.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mset1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mset3.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mset4.cpp.o" <20>
|
||||
|
||||
"{ObjDir}mset5.cpp.o" <20>
|
||||
|
||||
"{ObjDir}negate.cpp.o" <20>
|
||||
|
||||
"{ObjDir}nequal.cpp.o" <20>
|
||||
|
||||
"{ObjDir}nextprm0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}nextprm1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}nextprm2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}nthelem0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}nthelem1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}nthelem2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}ostmit.cpp.o" <20>
|
||||
|
||||
"{ObjDir}pair0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}pair1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}pair2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}parsrt0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}parsrt1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}parsrt2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}parsrtc0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}parsrtc1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}parsrtc2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}partsrt0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}partsum0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}partsum1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}partsum2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}pheap1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}pheap2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}plus.cpp.o" <20>
|
||||
|
||||
"{ObjDir}pqueue1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}prevprm0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}prevprm1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}prevprm2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}ptition0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}ptition1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}ptrbinf1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}ptrbinf2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}ptrunf1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}ptrunf2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}queue1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}rawiter.cpp.o" <20>
|
||||
|
||||
"{ObjDir}remcopy1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}remcpif1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}remif1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}remove1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}repcpif1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}replace0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}replace1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}replcpy1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}replif1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}revbit1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}revbit2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}revcopy1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}reverse1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}reviter1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}reviter2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}rndshuf0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}rndshuf1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}rndshuf2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}rotate0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}rotate1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}rotcopy0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}rotcopy1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}search0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}search1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}search2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}set1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}set2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setdiff0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setdiff1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setdiff2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setintr0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setintr1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setintr2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setsymd0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setsymd1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setsymd2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setunon0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setunon1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}setunon2.cpp.o" <20>
|
||||
|
||||
# "{ObjDir}single.cpp.o" <20>
|
||||
|
||||
"{ObjDir}slist1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}sort1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}sort2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}stack1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}stack2.cpp.o" <20>
|
||||
|
||||
# "{ObjDir}stat.cpp.o" <20>
|
||||
|
||||
"{ObjDir}stblptn0.cpp.o" <20>
|
||||
|
||||
"{ObjDir}stblptn1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}stblsrt1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}stblsrt2.cpp.o" <20>
|
||||
|
||||
# "{ObjDir}stl_single.cpp.o" <20>
|
||||
|
||||
"{ObjDir}stl_test.cpp.o" <20>
|
||||
|
||||
"{ObjDir}string1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}swap1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}swprnge1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}times.cpp.o" <20>
|
||||
|
||||
"{ObjDir}trnsfrm1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}trnsfrm2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}ucompos1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}ucompos2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}unegate1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}unegate2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}uniqcpy1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}uniqcpy2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}unique1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}unique2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}uprbnd1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}uprbnd2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}vec1.cpp.o" <20>
|
||||
|
||||
"{ObjDir}vec2.cpp.o" <20>
|
||||
|
||||
"{ObjDir}vec3.cpp.o" <20>
|
||||
|
||||
"{ObjDir}vec4.cpp.o" <20>
|
||||
|
||||
"{ObjDir}vec5.cpp.o" <20>
|
||||
|
||||
"{ObjDir}vec6.cpp.o" <20>
|
||||
|
||||
"{ObjDir}vec7.cpp.o" <20>
|
||||
|
||||
"{ObjDir}vec8.cpp.o" <20>
|
||||
|
||||
# end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Regression_test <EFBFBD><EFBFBD> setup
|
||||
|
||||
Regression_test <EFBFBD><EFBFBD> "{ObjDir}"Regression_test.68K
|
||||
|
||||
echo "<22>n'{ObjDir}Regression_test.68K' < '{stl}:test:regression:stdin' # execute it"
|
||||
|
||||
|
||||
|
||||
"{ObjDir}"Regression_test.68K <EFBFBD><EFBFBD> {<EFBFBD>MondoBuild<EFBFBD>} {Regression_Objects_68K} {Needed_SysLibs}
|
||||
|
||||
###########
|
||||
|
||||
if "{compile_status}"
|
||||
|
||||
echo "### LINK NOT PERFORMED DUE TO COMPILE ERROR"
|
||||
|
||||
exit "{compile_status}"
|
||||
|
||||
end
|
||||
|
||||
echo <20>n<EFBFBD>nLinking: "{Targ}"
|
||||
|
||||
ILink <20>
|
||||
|
||||
#Link <20>
|
||||
|
||||
-t 'MPST' <20>
|
||||
|
||||
-o {Targ} <20>
|
||||
|
||||
{Regression_Objects_68K} <20>
|
||||
|
||||
{Link_options} <20>
|
||||
|
||||
{Needed_SysLibs} <20>
|
||||
|
||||
# end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##################################################################################
|
||||
|
||||
# test:eh: build rule
|
||||
|
||||
##################################################################################
|
||||
|
||||
eh_Objects_68K = <20>
|
||||
|
||||
"{ObjDir}main.cpp.o" <20>
|
||||
|
||||
"{ObjDir}nc_alloc.cpp.o" <20>
|
||||
|
||||
"{ObjDir}random_number.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_algo.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_algobase.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_bit_vector.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_bitset.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_deque.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_hash_map.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_hash_set.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_list.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_map.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_rope.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_set.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_slist.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_string.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_valarray.cpp.o" <20>
|
||||
|
||||
"{ObjDir}test_vector.cpp.o" <20>
|
||||
|
||||
"{ObjDir}TestClass.cpp.o" <20>
|
||||
|
||||
#end
|
||||
|
||||
|
||||
|
||||
EH_test <EFBFBD><EFBFBD> setup
|
||||
|
||||
EH_test <EFBFBD><EFBFBD> "{ObjDir}"EH_test.68K
|
||||
|
||||
echo "<22>n'{ObjDir}EH_test.68K' # execute it"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"{ObjDir}"EH_test.68K <20><> "{stl}:test:regression:{<7B>MondoBuild<EFBFBD>}" {eh_Objects_68K} {Needed_SysLibs}
|
||||
|
||||
###########
|
||||
|
||||
if "{compile_status}"
|
||||
|
||||
echo "### LINK NOT PERFORMED DUE TO COMPILE TIME ERROR"
|
||||
|
||||
exit "{compile_status}"
|
||||
|
||||
end
|
||||
|
||||
echo <20>n<EFBFBD>nLinking: "{Targ}"
|
||||
|
||||
ILink <20>
|
||||
|
||||
#Link <20>
|
||||
|
||||
-t 'MPST' <20>
|
||||
|
||||
-o {Targ} <20>
|
||||
|
||||
{eh_Objects_68K} <20>
|
||||
|
||||
{Link_options} <20>
|
||||
|
||||
{Needed_SysLibs} <20>
|
||||
|
||||
# end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
26
STLPORT/test/regression/accum1.cpp
Normal file
26
STLPORT/test/regression/accum1.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define accum1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
|
||||
int accum1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of accum1_test:"<<endl;
|
||||
vector <int> v(5);
|
||||
for(int i = 0; i < v.size(); i++)
|
||||
v[i] = i + 1;
|
||||
int sum = accumulate(v.begin(), v.end(), 0);
|
||||
cout << "sum = " << sum << endl;
|
||||
return 0;
|
||||
}
|
||||
30
STLPORT/test/regression/accum2.cpp
Normal file
30
STLPORT/test/regression/accum2.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define accum2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
static int mult(int initial_, int element_)
|
||||
{
|
||||
return initial_ * element_;
|
||||
}
|
||||
int accum2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of accum2_test:"<<endl;
|
||||
|
||||
vector <int> v(5);
|
||||
for(int i = 0; i < v.size(); i++)
|
||||
v[i] = i + 1;
|
||||
int prod = accumulate(v.begin(), v.end(), 1, mult);
|
||||
cout << "prod = " << prod << endl;
|
||||
return 0;
|
||||
}
|
||||
31
STLPORT/test/regression/adjdiff0.cpp
Normal file
31
STLPORT/test/regression/adjdiff0.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <numeric>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define adjdiff0_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
int adjdiff0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of adjdiff0_test:"<<endl;
|
||||
int numbers[5] = { 1, 2, 4, 8, 16 };
|
||||
|
||||
int difference[5];
|
||||
adjacent_difference(numbers, numbers + 5, (int*)difference);
|
||||
int i;
|
||||
for(i = 0; i < 5; i++)
|
||||
cout << numbers[i] << ' ';
|
||||
cout << endl;
|
||||
for(i = 0; i < 5; i++)
|
||||
cout << difference[i] << ' ';
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
31
STLPORT/test/regression/adjdiff1.cpp
Normal file
31
STLPORT/test/regression/adjdiff1.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
#include <iterator>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define adjdiff1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int adjdiff1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of adjdiff1_test:"<<endl;
|
||||
vector <int> v(10);
|
||||
for(int i = 0; i < v.size(); i++)
|
||||
v[i] = i * i;
|
||||
vector <int> result(v.size());
|
||||
adjacent_difference(v.begin(), v.end(), result.begin());
|
||||
ostream_iterator<int> iter(cout, " ");
|
||||
// vector<int>::iterator iter;
|
||||
copy(v.begin(), v.end(), iter);
|
||||
cout << endl;
|
||||
copy(result.begin(), result.end(), iter);
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
35
STLPORT/test/regression/adjdiff2.cpp
Normal file
35
STLPORT/test/regression/adjdiff2.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
#include <iterator>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define adjdiff2_test main
|
||||
#endif
|
||||
static int mult(int a_, int b_)
|
||||
{
|
||||
return a_ * b_;
|
||||
}
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int adjdiff2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of adjdiff2_test:"<<endl;
|
||||
|
||||
vector <int> v(10);
|
||||
for(int i = 0; i < v.size(); i++)
|
||||
v[i] = i + 1;
|
||||
vector <int> rslt(v.size());
|
||||
adjacent_difference(v.begin(), v.end(), rslt.begin(), mult);
|
||||
ostream_iterator<int> iter(cout, " ");
|
||||
copy(v.begin(), v.end(), iter);
|
||||
cout << endl;
|
||||
copy(rslt.begin(), rslt.end(), iter);
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
43
STLPORT/test/regression/adjfind0.cpp
Normal file
43
STLPORT/test/regression/adjfind0.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define adjfind0_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int adjfind0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of adjfind0_test:"<<endl;
|
||||
int numbers1 [5] = { 1, 2, 4, 8, 16 };
|
||||
int numbers2 [5] = { 5, 3, 2, 1, 1 };
|
||||
|
||||
int* location = adjacent_find((int*)numbers1, (int*)numbers1 + 5);
|
||||
|
||||
if(location != numbers1 + 5)
|
||||
cout
|
||||
<< "Found adjacent pair of: "
|
||||
<< *location
|
||||
<< " at offset "
|
||||
<<(location - numbers1)
|
||||
<< endl;
|
||||
else
|
||||
cout << "No adjacent pairs" << endl;
|
||||
location = adjacent_find((int*)numbers2, (int*)numbers2 + 5);
|
||||
if(location != numbers2 + 5)
|
||||
cout
|
||||
<< "Found adjacent pair of: "
|
||||
<< *location
|
||||
<< " at offset "
|
||||
<<(location - numbers2)
|
||||
<< endl;
|
||||
else
|
||||
cout << "No adjacent pairs" << endl;
|
||||
return 0;
|
||||
}
|
||||
35
STLPORT/test/regression/adjfind1.cpp
Normal file
35
STLPORT/test/regression/adjfind1.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define adjfind1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int adjfind1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of adjfind1_test:"<<endl;
|
||||
typedef vector<int> IntVector;
|
||||
IntVector v(10);
|
||||
for(int i = 0; i < v.size(); i++)
|
||||
v[i] = i;
|
||||
IntVector::iterator location;
|
||||
location = adjacent_find(v.begin(), v.end());
|
||||
if(location != v.end())
|
||||
cout << "Found adjacent pair of: " << *location << endl;
|
||||
else
|
||||
cout << "No adjacent pairs" << endl;
|
||||
v[6] = 7;
|
||||
location = adjacent_find(v.begin(), v.end());
|
||||
if(location != v.end())
|
||||
cout << "Found adjacent pair of: " << *location << endl;
|
||||
else
|
||||
cout << "No adjacent pairs" << endl;
|
||||
return 0;
|
||||
}
|
||||
43
STLPORT/test/regression/adjfind2.cpp
Normal file
43
STLPORT/test/regression/adjfind2.cpp
Normal file
@@ -0,0 +1,43 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define adjfind2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
static int equal_length(const char* v1_, const char* v2_)
|
||||
{
|
||||
return ::strlen(v1_) == ::strlen(v2_);
|
||||
}
|
||||
int adjfind2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of adjfind2_test:"<<endl;
|
||||
typedef vector <char*> CStrVector;
|
||||
|
||||
char* names[] = { "Brett", "Graham", "Jack", "Mike", "Todd" };
|
||||
|
||||
const int nameCount = sizeof(names)/sizeof(names[0]);
|
||||
CStrVector v(nameCount);
|
||||
for(int i = 0; i < nameCount; i++)
|
||||
v[i] = names[i];
|
||||
CStrVector::iterator location;
|
||||
location = adjacent_find(v.begin(), v.end(), equal_length);
|
||||
if(location != v.end())
|
||||
cout
|
||||
<< "Found two adjacent strings of equal length: "
|
||||
<< *location
|
||||
<< " -and- "
|
||||
<< *(location + 1)
|
||||
<< endl;
|
||||
else
|
||||
cout << "Didn't find two adjacent strings of equal length.";
|
||||
return 0;
|
||||
}
|
||||
27
STLPORT/test/regression/advance.cpp
Normal file
27
STLPORT/test/regression/advance.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define advance_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int advance_test(int, char**)
|
||||
{
|
||||
cout<<"Results of advance_test:"<<endl;
|
||||
typedef vector <int> IntVector;
|
||||
IntVector v(10);
|
||||
for(int i = 0; i < v.size(); i++)
|
||||
v[i] = i;
|
||||
IntVector::iterator location = v.begin();
|
||||
cout << "At Beginning: " << *location << endl;
|
||||
advance(location, 5);
|
||||
cout << "At Beginning + 5: " << *location << endl;
|
||||
return 0;
|
||||
}
|
||||
23
STLPORT/test/regression/alg1.cpp
Normal file
23
STLPORT/test/regression/alg1.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define alg1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int alg1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of alg1_test:"<<endl;
|
||||
int i = min(4, 7);
|
||||
cout << "min(4, 7) = " << i << endl;
|
||||
char c = max('a', 'z');
|
||||
cout << "max('a', 'z') = " << c << endl;
|
||||
return 0;
|
||||
}
|
||||
23
STLPORT/test/regression/alg2.cpp
Normal file
23
STLPORT/test/regression/alg2.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define alg2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int alg2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of alg2_test:"<<endl;
|
||||
int n = 0;
|
||||
int i [] = { 1, 4, 2, 8, 2, 2 };
|
||||
|
||||
count(i, i + 6, 2, n);
|
||||
cout << "Count of 2s = " << n << endl;
|
||||
return 0;
|
||||
}
|
||||
30
STLPORT/test/regression/alg3.cpp
Normal file
30
STLPORT/test/regression/alg3.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define alg3_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int alg3_test(int, char**)
|
||||
{
|
||||
cout<<"Results of alg3_test:"<<endl;
|
||||
int n=0;
|
||||
vector<int> i;
|
||||
i.push_back(1);
|
||||
i.push_back(4);
|
||||
i.push_back(2);
|
||||
i.push_back(8);
|
||||
i.push_back(2);
|
||||
i.push_back(2);
|
||||
count(i.begin(), i.end(), 2, n);
|
||||
cout << "Count of 2s = " << n << endl;
|
||||
return 0;
|
||||
}
|
||||
28
STLPORT/test/regression/alg4.cpp
Normal file
28
STLPORT/test/regression/alg4.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define alg4_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int alg4_test(int, char**)
|
||||
{
|
||||
cout<<"Results of alg4_test:"<<endl;
|
||||
vector<int> years;
|
||||
years.push_back(1962);
|
||||
years.push_back(1992);
|
||||
years.push_back(2001);
|
||||
years.push_back(1999);
|
||||
sort(years.begin(), years.end());
|
||||
vector<int>::const_iterator i;
|
||||
for(i = years.begin(); i != years.end(); i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
27
STLPORT/test/regression/alg5.cpp
Normal file
27
STLPORT/test/regression/alg5.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <deque>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MAIN
|
||||
#define alg5_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int alg5_test(int, char**)
|
||||
{
|
||||
cout<<"Results of alg5_test:"<<endl;
|
||||
deque<int> years;
|
||||
years.push_back(1962);
|
||||
years.push_back(1992);
|
||||
years.push_back(2001);
|
||||
years.push_back(1999);
|
||||
deque<int>::iterator i;
|
||||
for(i = years.begin(); i != years.end(); i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
1714
STLPORT/test/regression/bc.mak
Normal file
1714
STLPORT/test/regression/bc.mak
Normal file
File diff suppressed because it is too large
Load Diff
279
STLPORT/test/regression/bc502.mak
Normal file
279
STLPORT/test/regression/bc502.mak
Normal file
@@ -0,0 +1,279 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32=bcc32
|
||||
CPP32=cpp32
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = stl_test.exe
|
||||
|
||||
OBJFILES = \
|
||||
vec2.obj\
|
||||
vec7.obj\
|
||||
vec6.obj\
|
||||
vec5.obj\
|
||||
vec4.obj\
|
||||
vec3.obj\
|
||||
vec8.obj\
|
||||
stat.obj\
|
||||
uprbnd2.obj\
|
||||
uprbnd1.obj\
|
||||
unique2.obj\
|
||||
unique1.obj\
|
||||
uniqcpy2.obj\
|
||||
uniqcpy1.obj\
|
||||
unegate2.obj\
|
||||
unegate1.obj\
|
||||
ucompos2.obj\
|
||||
ucompos1.obj\
|
||||
trnsfrm2.obj\
|
||||
trnsfrm1.obj\
|
||||
times.obj\
|
||||
swprnge1.obj\
|
||||
swap1.obj\
|
||||
stl_test.obj\
|
||||
stblsrt2.obj\
|
||||
stblsrt1.obj\
|
||||
stblptn1.obj\
|
||||
stblptn0.obj\
|
||||
vec1.obj\
|
||||
rotcopy0.obj\
|
||||
stack1.obj\
|
||||
sort2.obj\
|
||||
sort1.obj\
|
||||
setunon2.obj\
|
||||
setunon1.obj\
|
||||
setunon0.obj\
|
||||
setsymd2.obj\
|
||||
setsymd1.obj\
|
||||
setsymd0.obj\
|
||||
setintr2.obj\
|
||||
setintr1.obj\
|
||||
setintr0.obj\
|
||||
setdiff2.obj\
|
||||
setdiff1.obj\
|
||||
setdiff0.obj\
|
||||
set2.obj\
|
||||
set1.obj\
|
||||
search2.obj\
|
||||
search1.obj\
|
||||
search0.obj\
|
||||
rotcopy1.obj\
|
||||
stack2.obj\
|
||||
ptrunf1.obj\
|
||||
rotate0.obj\
|
||||
rndshuf2.obj\
|
||||
rndshuf1.obj\
|
||||
rndshuf0.obj\
|
||||
reviter2.obj\
|
||||
reviter1.obj\
|
||||
reverse1.obj\
|
||||
revcopy1.obj\
|
||||
revbit2.obj\
|
||||
revbit1.obj\
|
||||
replif1.obj\
|
||||
replcpy1.obj\
|
||||
replace1.obj\
|
||||
replace0.obj\
|
||||
repcpif1.obj\
|
||||
remove1.obj\
|
||||
remif1.obj\
|
||||
remcpif1.obj\
|
||||
remcopy1.obj\
|
||||
rawiter.obj\
|
||||
queue1.obj\
|
||||
ptrunf2.obj\
|
||||
rotate1.obj\
|
||||
pair0.obj\
|
||||
ptrbinf1.obj\
|
||||
ptition1.obj\
|
||||
ptition0.obj\
|
||||
prevprm2.obj\
|
||||
prevprm1.obj\
|
||||
prevprm0.obj\
|
||||
pqueue1.obj\
|
||||
plus.obj\
|
||||
pheap2.obj\
|
||||
pheap1.obj\
|
||||
partsum2.obj\
|
||||
partsum1.obj\
|
||||
partsum0.obj\
|
||||
partsrt0.obj\
|
||||
parsrtc2.obj\
|
||||
parsrtc1.obj\
|
||||
parsrtc0.obj\
|
||||
parsrt2.obj\
|
||||
parsrt1.obj\
|
||||
parsrt0.obj\
|
||||
pair2.obj\
|
||||
pair1.obj\
|
||||
ptrbinf2.obj\
|
||||
minelem1.obj\
|
||||
nthelem2.obj\
|
||||
nthelem1.obj\
|
||||
nthelem0.obj\
|
||||
nextprm2.obj\
|
||||
nextprm1.obj\
|
||||
nextprm0.obj\
|
||||
nequal.obj\
|
||||
negate.obj\
|
||||
mset5.obj\
|
||||
mset4.obj\
|
||||
mset3.obj\
|
||||
mset1.obj\
|
||||
modulus.obj\
|
||||
mmap2.obj\
|
||||
mmap1.obj\
|
||||
mkheap1.obj\
|
||||
mkheap0.obj\
|
||||
mismtch2.obj\
|
||||
mismtch1.obj\
|
||||
mismtch0.obj\
|
||||
minus.obj\
|
||||
minelem2.obj\
|
||||
ostmit.obj\
|
||||
iterswp1.obj\
|
||||
min1.obj\
|
||||
memfunptr.obj \
|
||||
merge2.obj\
|
||||
merge1.obj\
|
||||
merge0.obj\
|
||||
maxelem2.obj\
|
||||
maxelem1.obj\
|
||||
max2.obj\
|
||||
max1.obj\
|
||||
map1.obj\
|
||||
lwrbnd2.obj\
|
||||
lwrbnd1.obj\
|
||||
logicor.obj\
|
||||
logicnot.obj\
|
||||
logicand.obj\
|
||||
list4.obj\
|
||||
list3.obj\
|
||||
list2.obj\
|
||||
list1.obj\
|
||||
lexcmp2.obj\
|
||||
lexcmp1.obj\
|
||||
lesseq.obj\
|
||||
less.obj\
|
||||
min2.obj\
|
||||
greater.obj\
|
||||
iter4.obj\
|
||||
iter3.obj\
|
||||
iter2.obj\
|
||||
iter1.obj\
|
||||
istmit1.obj\
|
||||
iota1.obj\
|
||||
insert2.obj\
|
||||
insert1.obj\
|
||||
inrprod2.obj\
|
||||
inrprod1.obj\
|
||||
inrprod0.obj\
|
||||
inplmrg2.obj\
|
||||
inplmrg1.obj\
|
||||
incl2.obj\
|
||||
incl1.obj\
|
||||
incl0.obj\
|
||||
iterswp0.obj\
|
||||
eqlrnge2.obj\
|
||||
genern2.obj\
|
||||
genern1.obj\
|
||||
gener2.obj\
|
||||
gener1.obj\
|
||||
func3.obj\
|
||||
func2.obj\
|
||||
func1.obj\
|
||||
foreach1.obj\
|
||||
foreach0.obj\
|
||||
finsert2.obj\
|
||||
finsert1.obj\
|
||||
findif1.obj\
|
||||
findif0.obj\
|
||||
find1.obj\
|
||||
find0.obj\
|
||||
filln1.obj\
|
||||
fill1.obj\
|
||||
equalto.obj\
|
||||
equal2.obj\
|
||||
equal1.obj\
|
||||
equal0.obj\
|
||||
greateq.obj\
|
||||
binsrch1.obj\
|
||||
eqlrnge0.obj\
|
||||
divides.obj\
|
||||
deque1.obj\
|
||||
countif1.obj\
|
||||
count1.obj\
|
||||
count0.obj\
|
||||
copyb0.obj\
|
||||
copyb.obj\
|
||||
copy4.obj\
|
||||
copy3.obj\
|
||||
copy2.obj\
|
||||
copy1.obj\
|
||||
bvec1.obj\
|
||||
bnegate2.obj\
|
||||
bnegate1.obj\
|
||||
binsrch2.obj\
|
||||
eqlrnge1.obj\
|
||||
accum1.obj\
|
||||
binsert1.obj\
|
||||
bind2nd2.obj\
|
||||
bind2nd1.obj\
|
||||
bind1st1.obj\
|
||||
bind1st2.obj\
|
||||
bcompos2.obj\
|
||||
bcompos1.obj\
|
||||
alg5.obj\
|
||||
alg4.obj\
|
||||
alg3.obj\
|
||||
alg2.obj\
|
||||
alg1.obj\
|
||||
advance.obj\
|
||||
adjfind2.obj\
|
||||
adjfind1.obj\
|
||||
adjfind0.obj\
|
||||
adjdiff2.obj\
|
||||
adjdiff1.obj\
|
||||
adjdiff0.obj\
|
||||
accum2.obj\
|
||||
binsert2.obj\
|
||||
hmap1.obj hmmap1.obj hset2.obj hmset1.obj \
|
||||
slist1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHASM = .;
|
||||
PATHRC = .;
|
||||
|
||||
# USERDEFINES = _STLP_NO_OWN_IOSTREAMS
|
||||
SYSDEFINES = _RTLDLL;NO_STRICT;USEPACKAGES;_DEBUG
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
CFLAG1 = -w- -j1 -I.;..\..\stlport\BC50;..\..\stlport;$(BCB)\include; -Od -v -N -x -xp -tWC -D$(SYSDEFINES);$(USERDEFINES) -L..\..\lib
|
||||
# CFLAG1 = -w- -jb -j1 -I.;..\..\stlport;$(BCB)\include; -tWC -D$(SYSDEFINES);$(USERDEFINES) -L..\..\lib
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
all : $(PROJECT)
|
||||
|
||||
$(PROJECT) : $(OBJFILES)
|
||||
$(BCB)\BIN\$(BCC32) -e$(PROJECT) $(CFLAG1) $(OBJFILES)
|
||||
|
||||
clean:
|
||||
del *.obj *.exe *.core *.tds
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
.cpp.obj:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) -n$(@D) -c $<
|
||||
|
||||
.cpp.exe:
|
||||
$(BCB)\BIN\$(BCC32) $(CFLAG1) -DMAIN -n$(@D) $<
|
||||
|
||||
.cpp.i:
|
||||
$(BCB)\BIN\$(CPP32) $(CFLAG1) -n. -Sd {$< }
|
||||
# ---------------------------------------------------------------------------
|
||||
284
STLPORT/test/regression/bcb.mak
Normal file
284
STLPORT/test/regression/bcb.mak
Normal file
@@ -0,0 +1,284 @@
|
||||
# ---------------------------------------------------------------------------
|
||||
!if !$d(BCB)
|
||||
BCB = $(MAKEDIR)\..
|
||||
!endif
|
||||
|
||||
BCC32=bcc32
|
||||
CPP32=cpp32
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
PROJECT = stl_test.exe
|
||||
|
||||
OBJFILES = \
|
||||
vec2.obj\
|
||||
vec7.obj\
|
||||
vec6.obj\
|
||||
vec5.obj\
|
||||
vec4.obj\
|
||||
vec3.obj\
|
||||
vec8.obj\
|
||||
stat.obj\
|
||||
uprbnd2.obj\
|
||||
uprbnd1.obj\
|
||||
unique2.obj\
|
||||
unique1.obj\
|
||||
uniqcpy2.obj\
|
||||
uniqcpy1.obj\
|
||||
unegate2.obj\
|
||||
unegate1.obj\
|
||||
ucompos2.obj\
|
||||
ucompos1.obj\
|
||||
trnsfrm2.obj\
|
||||
trnsfrm1.obj\
|
||||
times.obj\
|
||||
swprnge1.obj\
|
||||
swap1.obj\
|
||||
stl_test.obj\
|
||||
stblsrt2.obj\
|
||||
stblsrt1.obj\
|
||||
stblptn1.obj\
|
||||
stblptn0.obj\
|
||||
vec1.obj\
|
||||
rotcopy0.obj\
|
||||
stack1.obj\
|
||||
sort2.obj\
|
||||
sort1.obj\
|
||||
setunon2.obj\
|
||||
setunon1.obj\
|
||||
setunon0.obj\
|
||||
setsymd2.obj\
|
||||
setsymd1.obj\
|
||||
setsymd0.obj\
|
||||
setintr2.obj\
|
||||
setintr1.obj\
|
||||
setintr0.obj\
|
||||
setdiff2.obj\
|
||||
setdiff1.obj\
|
||||
setdiff0.obj\
|
||||
set2.obj\
|
||||
set1.obj\
|
||||
search2.obj\
|
||||
search1.obj\
|
||||
search0.obj\
|
||||
rotcopy1.obj\
|
||||
stack2.obj\
|
||||
ptrunf1.obj\
|
||||
rotate0.obj\
|
||||
rndshuf2.obj\
|
||||
rndshuf1.obj\
|
||||
rndshuf0.obj\
|
||||
reviter2.obj\
|
||||
reviter1.obj\
|
||||
reverse1.obj\
|
||||
revcopy1.obj\
|
||||
revbit2.obj\
|
||||
revbit1.obj\
|
||||
replif1.obj\
|
||||
replcpy1.obj\
|
||||
replace1.obj\
|
||||
replace0.obj\
|
||||
repcpif1.obj\
|
||||
remove1.obj\
|
||||
remif1.obj\
|
||||
remcpif1.obj\
|
||||
remcopy1.obj\
|
||||
rawiter.obj\
|
||||
queue1.obj\
|
||||
ptrunf2.obj\
|
||||
rotate1.obj\
|
||||
pair0.obj\
|
||||
ptrbinf1.obj\
|
||||
ptition1.obj\
|
||||
ptition0.obj\
|
||||
prevprm2.obj\
|
||||
prevprm1.obj\
|
||||
prevprm0.obj\
|
||||
pqueue1.obj\
|
||||
plus.obj\
|
||||
pheap2.obj\
|
||||
pheap1.obj\
|
||||
partsum2.obj\
|
||||
partsum1.obj\
|
||||
partsum0.obj\
|
||||
partsrt0.obj\
|
||||
parsrtc2.obj\
|
||||
parsrtc1.obj\
|
||||
parsrtc0.obj\
|
||||
parsrt2.obj\
|
||||
parsrt1.obj\
|
||||
parsrt0.obj\
|
||||
pair2.obj\
|
||||
pair1.obj\
|
||||
ptrbinf2.obj\
|
||||
minelem1.obj\
|
||||
nthelem2.obj\
|
||||
nthelem1.obj\
|
||||
nthelem0.obj\
|
||||
nextprm2.obj\
|
||||
nextprm1.obj\
|
||||
nextprm0.obj\
|
||||
nequal.obj\
|
||||
negate.obj\
|
||||
mset5.obj\
|
||||
mset4.obj\
|
||||
mset3.obj\
|
||||
mset1.obj\
|
||||
modulus.obj\
|
||||
mmap2.obj\
|
||||
mmap1.obj\
|
||||
mkheap1.obj\
|
||||
mkheap0.obj\
|
||||
mismtch2.obj\
|
||||
mismtch1.obj\
|
||||
mismtch0.obj\
|
||||
minus.obj\
|
||||
minelem2.obj\
|
||||
ostmit.obj\
|
||||
iterswp1.obj\
|
||||
min1.obj\
|
||||
memfunptr.obj \
|
||||
merge2.obj\
|
||||
merge1.obj\
|
||||
merge0.obj\
|
||||
maxelem2.obj\
|
||||
maxelem1.obj\
|
||||
max2.obj\
|
||||
max1.obj\
|
||||
map1.obj\
|
||||
lwrbnd2.obj\
|
||||
lwrbnd1.obj\
|
||||
logicor.obj\
|
||||
logicnot.obj\
|
||||
logicand.obj\
|
||||
list4.obj\
|
||||
list3.obj\
|
||||
list2.obj\
|
||||
list1.obj\
|
||||
lexcmp2.obj\
|
||||
lexcmp1.obj\
|
||||
lesseq.obj\
|
||||
less.obj\
|
||||
min2.obj\
|
||||
greater.obj\
|
||||
iter4.obj\
|
||||
iter3.obj\
|
||||
iter2.obj\
|
||||
iter1.obj\
|
||||
istmit1.obj\
|
||||
iota1.obj\
|
||||
insert2.obj\
|
||||
insert1.obj\
|
||||
inrprod2.obj\
|
||||
inrprod1.obj\
|
||||
inrprod0.obj\
|
||||
inplmrg2.obj\
|
||||
inplmrg1.obj\
|
||||
incl2.obj\
|
||||
incl1.obj\
|
||||
incl0.obj\
|
||||
iterswp0.obj\
|
||||
eqlrnge2.obj\
|
||||
genern2.obj\
|
||||
genern1.obj\
|
||||
gener2.obj\
|
||||
gener1.obj\
|
||||
func3.obj\
|
||||
func2.obj\
|
||||
func1.obj\
|
||||
foreach1.obj\
|
||||
foreach0.obj\
|
||||
finsert2.obj\
|
||||
finsert1.obj\
|
||||
findif1.obj\
|
||||
findif0.obj\
|
||||
find1.obj\
|
||||
find0.obj\
|
||||
filln1.obj\
|
||||
fill1.obj\
|
||||
equalto.obj\
|
||||
equal2.obj\
|
||||
equal1.obj\
|
||||
equal0.obj\
|
||||
greateq.obj\
|
||||
binsrch1.obj\
|
||||
eqlrnge0.obj\
|
||||
divides.obj\
|
||||
deque1.obj\
|
||||
countif1.obj\
|
||||
count1.obj\
|
||||
count0.obj\
|
||||
copyb0.obj\
|
||||
copyb.obj\
|
||||
copy4.obj\
|
||||
copy3.obj\
|
||||
copy2.obj\
|
||||
copy1.obj\
|
||||
bvec1.obj\
|
||||
bnegate2.obj\
|
||||
bnegate1.obj\
|
||||
binsrch2.obj\
|
||||
eqlrnge1.obj\
|
||||
accum1.obj\
|
||||
binsert1.obj\
|
||||
bind2nd2.obj\
|
||||
bind2nd1.obj\
|
||||
bind1st1.obj\
|
||||
bind1st2.obj\
|
||||
bcompos2.obj\
|
||||
bcompos1.obj\
|
||||
alg5.obj\
|
||||
alg4.obj\
|
||||
alg3.obj\
|
||||
alg2.obj\
|
||||
alg1.obj\
|
||||
advance.obj\
|
||||
adjfind2.obj\
|
||||
adjfind1.obj\
|
||||
adjfind0.obj\
|
||||
adjdiff2.obj\
|
||||
adjdiff1.obj\
|
||||
adjdiff0.obj\
|
||||
accum2.obj\
|
||||
binsert2.obj\
|
||||
hmap1.obj hmmap1.obj hset2.obj hmset1.obj \
|
||||
slist1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
PATHCPP = .;
|
||||
PATHPAS = .;
|
||||
PATHASM = .;
|
||||
PATHRC = .;
|
||||
|
||||
USERDEFINES = _DEBUG
|
||||
SYSDEFINES = NO_STRICT;USEPACKAGES
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# CFLAG1 = -w- -jb -j1 -I.;..\..\stlport;$(BCB)\include; -Od -v -N -x -xp -tWCR -D$(SYSDEFINES);$(USERDEFINES) -L..\..\lib
|
||||
|
||||
# CFLAG1 = -w- -jb -j1 -I.;..\..\stlport;$(BCB)\include; -tWCR -w-par -w-inl -w-stl -D$(SYSDEFINES);$(USERDEFINES)
|
||||
|
||||
CFLAG1 = -w- -jb -j1 -I.;..\..\stlport;$(BCB)\include; -Od -v -N -x -xp -tWC -D$(SYSDEFINES);$(USERDEFINES) -L..\..\lib
|
||||
|
||||
LDFLAGS = -L..\..\lib;$(BCB)\..\lib stlpst.lib
|
||||
|
||||
.autodepend
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
all : $(PROJECT)
|
||||
|
||||
$(PROJECT) : $(OBJFILES)
|
||||
$(BCB)\BIN\$(BCC32) -e$(PROJECT) $(CFLAG1) $(LDFLAGS) $(OBJFILES)
|
||||
|
||||
clean:
|
||||
del *.obj *.exe *.core *.tds
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
.cpp.obj:
|
||||
$(BCC32) $(CFLAG1) -n$(@D) -c $<
|
||||
|
||||
.cpp.exe:
|
||||
$(BCC32) $(CFLAG1) -DMAIN -n$(@D) $<
|
||||
|
||||
.cpp.i:
|
||||
$(CPP32) $(CFLAG1) -n. -Sr -Ss -Sd {$< }
|
||||
# ---------------------------------------------------------------------------
|
||||
31
STLPORT/test/regression/bcompos1.cpp
Normal file
31
STLPORT/test/regression/bcompos1.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "unary.h"
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define bcompos1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int bcompos1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of bcompos1_test:"<<endl;
|
||||
|
||||
int array [6] = { -2, -1, 0, 1, 2, 3 };
|
||||
|
||||
binary_compose<logical_and<bool>, odd, positive>
|
||||
b = binary_compose<logical_and<bool>, odd, positive>
|
||||
(logical_and<bool>(), odd(), positive());
|
||||
int* p = find_if((int*)array, (int*)array + 6, b);
|
||||
if(p != array + 6)
|
||||
cout << *p << " is odd and positive" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
28
STLPORT/test/regression/bcompos2.cpp
Normal file
28
STLPORT/test/regression/bcompos2.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "unary.h"
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define bcompos2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int bcompos2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of bcompos2_test:"<<endl;
|
||||
|
||||
int array [6] = { -2, -1 , 0, 1, 2, 3 };
|
||||
|
||||
int* p = find_if((int*)array, (int*)array + 6,
|
||||
compose2(logical_and<bool>(), odd(), positive()));
|
||||
if(p != array + 6)
|
||||
cout << *p << " is odd and positive" << endl;
|
||||
return 0;
|
||||
}
|
||||
24
STLPORT/test/regression/bind1st1.cpp
Normal file
24
STLPORT/test/regression/bind1st1.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define bind1st1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int bind1st1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of bind1st1_test:"<<endl;
|
||||
int array [3] = { 1, 2, 3 };
|
||||
int* p = remove_if((int*)array, (int*)array + 3,
|
||||
bind1st(less<int>(), 2));
|
||||
for(int* i = array; i != p; i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
24
STLPORT/test/regression/bind1st2.cpp
Normal file
24
STLPORT/test/regression/bind1st2.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define bind1st2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int bind1st2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of bind1st2_test:"<<endl;
|
||||
int array [3] = { 1, 2, 3 };
|
||||
|
||||
int* p = remove_if((int*)array, (int*)array + 3, bind1st(less<int>(), 2));
|
||||
for(int* i = array; i != p; i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
25
STLPORT/test/regression/bind2nd1.cpp
Normal file
25
STLPORT/test/regression/bind2nd1.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define bind2nd1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int bind2nd1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of bind2nd1_test:"<<endl;
|
||||
int array [3] = { 1, 2, 3 };
|
||||
|
||||
replace_if(array, array + 3,
|
||||
binder2nd<greater<int> >(greater<int>(), 2), 4);
|
||||
for(int i = 0; i < 3; i++)
|
||||
cout << array[i] << endl;
|
||||
return 0;
|
||||
}
|
||||
24
STLPORT/test/regression/bind2nd2.cpp
Normal file
24
STLPORT/test/regression/bind2nd2.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define bind2nd2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int bind2nd2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of bind2nd2_test:"<<endl;
|
||||
int array [3] = { 1, 2, 3 };
|
||||
|
||||
replace_if(array, array + 3, bind2nd(greater<int>(), 2), 4);
|
||||
for(int i = 0; i < 3; i++)
|
||||
cout << array[i] << endl;
|
||||
return 0;
|
||||
}
|
||||
26
STLPORT/test/regression/binsert1.cpp
Normal file
26
STLPORT/test/regression/binsert1.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MAIN
|
||||
#define binsert1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int binsert1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of binsert1_test:"<<endl;
|
||||
char* array [] = { "laurie", "jennifer", "leisa" };
|
||||
|
||||
vector<char*> names;
|
||||
copy(array, array + 3, back_insert_iterator<vector <char*> >(names));
|
||||
std::vector<char*>::iterator i;
|
||||
for(i = names.begin(); i != names.end(); i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
26
STLPORT/test/regression/binsert2.cpp
Normal file
26
STLPORT/test/regression/binsert2.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MAIN
|
||||
#define binsert2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int binsert2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of binsert2_test:"<<endl;
|
||||
char* array [] = { "laurie", "jennifer", "leisa" };
|
||||
|
||||
vector<char*> names;
|
||||
copy(array, array + 3, back_inserter(names));
|
||||
std::vector<char*>::iterator i;
|
||||
for(i = names.begin(); i != names.end(); i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
25
STLPORT/test/regression/binsrch1.cpp
Normal file
25
STLPORT/test/regression/binsrch1.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MAIN
|
||||
#define binsrch1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int binsrch1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of binsrch1_test:"<<endl;
|
||||
int vector[100];
|
||||
for(int i = 0; i < 100; i++)
|
||||
vector[i] = i;
|
||||
if(binary_search(vector, vector + 100, 42))
|
||||
cout << "found 42" << endl;
|
||||
else
|
||||
cout << "did not find 42" << endl;
|
||||
return 0;
|
||||
}
|
||||
33
STLPORT/test/regression/binsrch2.cpp
Normal file
33
STLPORT/test/regression/binsrch2.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
#ifdef MAIN
|
||||
#define binsrch2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
static bool str_compare(const char* a_, const char* b_)
|
||||
{
|
||||
return strcmp(a_, b_) < 0 ? 1 : 0;
|
||||
}
|
||||
int binsrch2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of binsrch2_test:"<<endl;
|
||||
|
||||
char* labels[] = { "aa", "dd", "ff", "jj", "ss", "zz" };
|
||||
|
||||
const unsigned count = sizeof(labels) / sizeof(labels[0]);
|
||||
// DEC C++ generates incorrect template instatiation code
|
||||
// for "ff" so must cast
|
||||
if(binary_search(labels, labels + count, (const char *)"ff", str_compare))
|
||||
cout << "ff is in labels." << endl;
|
||||
else
|
||||
cout << "ff is not in labels." << endl;
|
||||
return 0;
|
||||
}
|
||||
58
STLPORT/test/regression/bitset1.cpp
Normal file
58
STLPORT/test/regression/bitset1.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
|
||||
#include <stdexcept>
|
||||
#include <iostream>
|
||||
#include <bitset>
|
||||
#include <algorithm>
|
||||
|
||||
#if defined (_STLP_MSVC) && (_MSC_VER < 1300)
|
||||
# define _STLP_NON_TYPE_TMPL_PARAM_BUG
|
||||
# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
#endif
|
||||
|
||||
# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
|
||||
# define CHART
|
||||
# else
|
||||
# define CHART <char, char_traits<char>, allocator<char> >
|
||||
# endif
|
||||
|
||||
#ifdef MAIN
|
||||
#define bitset1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
int bitset1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of bitset1_test:"<<endl;
|
||||
|
||||
# if ! (defined (_STLP_MSVC) && (_MSC_VER < 1300)) && ! (defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x500))
|
||||
bitset<13U> b1(0xFFFF);
|
||||
bitset<13U> b2(0x1111);
|
||||
// Boris : MSVC just cannot take it right
|
||||
cout << "b1 size = " << b1.size() << endl;
|
||||
# if !defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
|
||||
cout << "b1 = "<<b1<<endl;
|
||||
# else
|
||||
cout << "b1 = "<<b1.to_string CHART ()<<endl;
|
||||
# endif
|
||||
cout << "b2 size = " << b2.size() << endl;
|
||||
# if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
|
||||
cout << "b2 = "<<b2.to_string CHART ()<<endl;
|
||||
# else
|
||||
cout << "b2 = "<<b2<<endl;
|
||||
# endif
|
||||
b1 = b1^(b2<<2);
|
||||
# ifdef _STLP_NON_TYPE_TMPL_PARAM_BUG
|
||||
cout << "b1 = "<<b1.to_string CHART ()<<endl;
|
||||
# else
|
||||
cout << "b1 = "<<b1<<endl;
|
||||
# endif
|
||||
# endif /* MSVC */
|
||||
return 0;
|
||||
}
|
||||
|
||||
24
STLPORT/test/regression/bnegate1.cpp
Normal file
24
STLPORT/test/regression/bnegate1.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define bnegate1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int bnegate1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of bnegate1_test:"<<endl;
|
||||
int array [4] = { 4, 9, 7, 1 };
|
||||
|
||||
sort(array, array + 4, binary_negate<greater<int> >(greater<int>()));
|
||||
for(int i = 0; i < 4; i++)
|
||||
cout << array[i] << endl;
|
||||
return 0;
|
||||
}
|
||||
24
STLPORT/test/regression/bnegate2.cpp
Normal file
24
STLPORT/test/regression/bnegate2.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define bnegate2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int bnegate2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of bnegate2_test:"<<endl;
|
||||
int array [4] = { 4, 9, 7, 1 };
|
||||
|
||||
sort(array, array + 4, not2(greater<int>()));
|
||||
for(int i = 0; i < 4; i++)
|
||||
cout << array[i] << endl;
|
||||
return 0;
|
||||
}
|
||||
98
STLPORT/test/regression/bug.cpp
Normal file
98
STLPORT/test/regression/bug.cpp
Normal file
@@ -0,0 +1,98 @@
|
||||
# include <iostream>
|
||||
# include <string>
|
||||
|
||||
# if 0
|
||||
namespace N1 {
|
||||
template <class T>
|
||||
struct X {};
|
||||
}
|
||||
|
||||
namespace N2 {
|
||||
using N1::X;
|
||||
// using namespace N1;
|
||||
|
||||
class AA
|
||||
{
|
||||
|
||||
X<int> xint;
|
||||
}
|
||||
;
|
||||
typedef X<int> xint;
|
||||
|
||||
|
||||
template <class T>
|
||||
struct X1 : N1::X<T> {}; // fatal error C1001:Internal compiler error
|
||||
}
|
||||
|
||||
namespace N3 {
|
||||
using N1::X;
|
||||
using N2::X;
|
||||
using N2::xint;
|
||||
|
||||
N2::xint x;
|
||||
N2::X<int> y;
|
||||
}
|
||||
|
||||
|
||||
using N2::X;
|
||||
N2::X<int> y;
|
||||
|
||||
N2::X1<int> y;
|
||||
|
||||
main()
|
||||
{
|
||||
std::basic_ostream<char, std::char_traits<char> > os;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
# endif
|
||||
|
||||
# include <iostream>
|
||||
|
||||
using namespace std;
|
||||
|
||||
# if 0
|
||||
class mystream : public std::istream
|
||||
{
|
||||
public:
|
||||
typedef std::istream _Base;
|
||||
|
||||
mystream(const std::istream& s) : _Base(s)
|
||||
{
|
||||
}
|
||||
|
||||
mystream& operator >>(char& c)
|
||||
{
|
||||
using std::istream;
|
||||
((std::istream&)*this)>> ( c ) ;
|
||||
// istream::operator>>(c);
|
||||
|
||||
return ( *this ) ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
;
|
||||
|
||||
mystream& aaa ( mystream& m, char& c)
|
||||
{
|
||||
m>>c;
|
||||
return m;
|
||||
}
|
||||
# endif
|
||||
|
||||
|
||||
main()
|
||||
{
|
||||
string sss = "Hello World";
|
||||
string ss2 = "aaa";
|
||||
|
||||
if (ss2 >= 'c' + sss)
|
||||
cout<<(sss+ss2);
|
||||
|
||||
// mystream mm(std::cin);
|
||||
// char cc;
|
||||
// aaa(mm, cc);
|
||||
|
||||
}
|
||||
51
STLPORT/test/regression/bvec1.cpp
Normal file
51
STLPORT/test/regression/bvec1.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#ifdef MAIN
|
||||
#define bvec1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
int bvec1_test(int, char**)
|
||||
{
|
||||
bool ii[3]= {1,0,1};
|
||||
cout<<"Results of bvec1_test:"<<endl;
|
||||
bit_vector b(3);
|
||||
int i;
|
||||
for(i = 0; i < b.size(); i++)
|
||||
cout << b[i];
|
||||
cout << endl;
|
||||
b[0] = b[2] = 1;
|
||||
for(i = 0; i < b.size(); i++)
|
||||
cout << b[i];
|
||||
cout << endl;
|
||||
b.insert(b.begin(),(bool*)ii, ii+2);
|
||||
for(i = 0; i < b.size(); i++)
|
||||
cout << b[i];
|
||||
cout << endl;
|
||||
bit_vector bb = b;
|
||||
if (bb != b)
|
||||
exit(1);
|
||||
|
||||
b[0] |= 0;
|
||||
b[1] |= 0;
|
||||
b[2] |= 1;
|
||||
b[3] |= 1;
|
||||
if ((b[0] != 1) || (b[1] != 0) || (b[2] != 1) || (b[3] != 1))
|
||||
exit(1);
|
||||
|
||||
bb[0] &= 0;
|
||||
bb[1] &= 0;
|
||||
bb[2] &= 1;
|
||||
bb[3] &= 1;
|
||||
if ((bb[0] != 0) || (bb[1] != 0) || (bb[2] != 1) || (bb[3] != 0))
|
||||
exit(1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
171
STLPORT/test/regression/como.mak
Normal file
171
STLPORT/test/regression/como.mak
Normal file
@@ -0,0 +1,171 @@
|
||||
# ;;; -*- Mode:makefile;-*-
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# This requires GNU make.
|
||||
.SUFFIXES: .cc .cpp .o .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
# This makefile assumes STLport is configured as primary lib
|
||||
# STL_INCL=-I../../stlport
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
memfunptr.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
# STAT_MODULE=stat.o
|
||||
OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = como
|
||||
CXX = $(CC)
|
||||
|
||||
DEBUG_FLAGS= -D_STLP_DEBUG
|
||||
|
||||
CXXFLAGS = -DLIBCIO= --diag_suppress=68 ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
# CXXFLAGS = -Wall ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | ./$(TEST_EXE) > $(TEST)
|
||||
|
||||
|
||||
.cc.o .cxx.o .C.o .cpp.o:
|
||||
${CXX} ${CXXFLAGS} ${DEBUG_FLAGS} ${REPO_FLAGS} -c -o $*.o $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN=1 $< -c -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $< $(STAT_MODULE) $(LIBSTDCXX) -lstdc++ $(LIBS) -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
$(STAT_MODULE): stat.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} -c $< -o $@
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -O3 -fno-exceptions -D_STLP_NO_EXCEPTIONS -S $< -o $*.s
|
||||
|
||||
%.i: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -E $< > $@
|
||||
|
||||
clean:
|
||||
-rm -rf *.exe *.out *.o *.rpo core *.out Templates.DB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
24
STLPORT/test/regression/copy1.cpp
Normal file
24
STLPORT/test/regression/copy1.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
#ifdef MAIN
|
||||
#define copy1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int copy1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of copy1_test:"<<endl;
|
||||
char string[23] = "A string to be copied.";
|
||||
|
||||
char result[23];
|
||||
copy(string, string + 23, result);
|
||||
cout << " Src: " << string << "\nDest: " << result << endl;
|
||||
return 0;
|
||||
}
|
||||
26
STLPORT/test/regression/copy2.cpp
Normal file
26
STLPORT/test/regression/copy2.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
|
||||
#ifdef MAIN
|
||||
#define copy2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int copy2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of copy2_test:"<<endl;
|
||||
vector <int> v(10);
|
||||
for(int i = 0; i < v.size(); i++)
|
||||
v[i] = i;
|
||||
ostream_iterator<int> iter(cout, " ");
|
||||
copy(v.begin(), v.end(), iter);
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
28
STLPORT/test/regression/copy3.cpp
Normal file
28
STLPORT/test/regression/copy3.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
|
||||
#ifdef MAIN
|
||||
#define copy3_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int copy3_test(int, char**)
|
||||
{
|
||||
cout<<"Results of copy3_test:"<<endl;
|
||||
vector <int> v1(10);
|
||||
for(int i = 0; i < v1.size(); i++)
|
||||
v1[i] = i;
|
||||
vector <int> v2(10);
|
||||
copy(v1.begin(), v1.end(), v2.begin());
|
||||
ostream_iterator<int> iter(cout, " ");
|
||||
copy(v2.begin(), v2.end(), iter);
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
30
STLPORT/test/regression/copy4.cpp
Normal file
30
STLPORT/test/regression/copy4.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
|
||||
#ifdef MAIN
|
||||
#define copy4_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int copy4_test(int, char**)
|
||||
{
|
||||
cout<<"Results of copy4_test:"<<endl;
|
||||
typedef vector<int> IVec;
|
||||
vector<int> v1(10);
|
||||
for(int loc = 0; loc < v1.size(); loc++)
|
||||
v1[loc] = loc;
|
||||
vector<int> v2;
|
||||
insert_iterator<IVec> i(v2, v2.begin());
|
||||
copy(v1.begin(), v1.end(), i);
|
||||
ostream_iterator<int> outIter(cout, " ");
|
||||
copy(v2.begin(), v2.end(), outIter);
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
28
STLPORT/test/regression/copyb.cpp
Normal file
28
STLPORT/test/regression/copyb.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define copyb_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int copyb_test(int, char**)
|
||||
{
|
||||
cout<<"Results of copyb_test:"<<endl;
|
||||
vector <int> v1(10);
|
||||
for(int i = 0; i < v1.size(); i++)
|
||||
v1[i] = i;
|
||||
vector <int> v2(v1.size());
|
||||
copy_backward(v1.begin(), v1.end(), v2.end());
|
||||
ostream_iterator<int> iter(cout, " ");
|
||||
copy(v2.begin(), v2.end(), iter);
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
29
STLPORT/test/regression/copyb0.cpp
Normal file
29
STLPORT/test/regression/copyb0.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define copyb0_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int copyb0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of copyb0_test:"<<endl;
|
||||
int numbers[5] = { 1, 2, 3, 4, 5 };
|
||||
|
||||
int result[5];
|
||||
copy_backward(numbers, numbers + 5, (int*)result + 5);
|
||||
int i;
|
||||
for(i = 0; i < 5; i++)
|
||||
cout << numbers[i] << ' ';
|
||||
cout << endl;
|
||||
for(i = 0; i < 5; i++)
|
||||
cout << result[i] << ' ';
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
23
STLPORT/test/regression/count0.cpp
Normal file
23
STLPORT/test/regression/count0.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define count0_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int count0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of count0_test:"<<endl;
|
||||
int numbers[10] = { 1, 2, 4, 1, 2, 4, 1, 2, 4, 1 };
|
||||
|
||||
int result = 0;
|
||||
count(numbers, numbers + 10, 1, result);
|
||||
cout << "Found " << result << " 1's." << endl;
|
||||
return 0;
|
||||
}
|
||||
25
STLPORT/test/regression/count1.cpp
Normal file
25
STLPORT/test/regression/count1.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define count1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int count1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of count1_test:"<<endl;
|
||||
vector <int> numbers(100);
|
||||
for(int i = 0; i < 100; i++)
|
||||
numbers[i] = i % 3;
|
||||
int elements = 0;
|
||||
count(numbers.begin(), numbers.end(), 2, elements);
|
||||
cout << "Found " << elements << " 2's." << endl;
|
||||
return 0;
|
||||
}
|
||||
30
STLPORT/test/regression/countif1.cpp
Normal file
30
STLPORT/test/regression/countif1.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define countif1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
static int odd(int a_)
|
||||
{
|
||||
return a_ % 2;
|
||||
}
|
||||
int countif1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of countif1_test:"<<endl;
|
||||
|
||||
vector <int> numbers(100);
|
||||
for(int i = 0; i < 100; i++)
|
||||
numbers[i] = i % 3;
|
||||
int elements = 0;
|
||||
count_if(numbers.begin(), numbers.end(), odd, elements);
|
||||
cout << "Found " << elements << " odd elements." << endl;
|
||||
return 0;
|
||||
}
|
||||
268
STLPORT/test/regression/cray.mak
Normal file
268
STLPORT/test/regression/cray.mak
Normal file
@@ -0,0 +1,268 @@
|
||||
# This requires GNU make.
|
||||
.POSIX:
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
# point this to proper location
|
||||
STL_INCL=-I${PWD}/../../stlport/
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmap1.cpp hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
OBJECTS = stl_test.o accum1.o accum2.o \
|
||||
adjdiff0.o adjdiff1.o adjdiff2.o \
|
||||
adjfind0.o adjfind1.o adjfind2.o \
|
||||
advance.o \
|
||||
alg1.o alg2.o alg3.o alg4.o alg5.o \
|
||||
bcompos1.o bcompos2.o \
|
||||
bind1st1.o bind1st2.o \
|
||||
bind2nd1.o bind2nd2.o \
|
||||
binsert1.o binsert2.o \
|
||||
binsrch1.o binsrch2.o \
|
||||
bnegate1.o bnegate2.o bvec1.o \
|
||||
copy1.o copy2.o copy3.o copy4.o \
|
||||
copyb.o copyb0.o \
|
||||
count0.o count1.o \
|
||||
countif1.o \
|
||||
deque1.o \
|
||||
divides.o \
|
||||
eqlrnge0.o eqlrnge1.o eqlrnge2.o \
|
||||
equal0.o equal1.o equal2.o \
|
||||
equalto.o \
|
||||
fill1.o filln1.o \
|
||||
find0.o find1.o \
|
||||
findif0.o findif1.o \
|
||||
finsert1.o finsert2.o \
|
||||
foreach0.o foreach1.o \
|
||||
func1.o func2.o func3.o \
|
||||
gener1.o gener2.o \
|
||||
genern1.o genern2.o \
|
||||
greateq.o greater.o \
|
||||
incl0.o incl1.o incl2.o \
|
||||
inplmrg1.o inplmrg2.o \
|
||||
inrprod0.o inrprod1.o inrprod2.o \
|
||||
insert1.o insert2.o \
|
||||
iota1.o \
|
||||
istmit1.o \
|
||||
iter1.o iter2.o iter3.o iter4.o \
|
||||
iterswp0.o iterswp1.o \
|
||||
less.o \
|
||||
lesseq.o \
|
||||
lexcmp1.o lexcmp2.o \
|
||||
list1.o list2.o list3.o list4.o \
|
||||
logicand.o logicnot.o \
|
||||
logicor.o \
|
||||
lwrbnd1.o lwrbnd2.o \
|
||||
map1.o \
|
||||
max1.o max2.o \
|
||||
maxelem1.o maxelem2.o \
|
||||
merge0.o merge1.o merge2.o \
|
||||
min1.o min2.o \
|
||||
minelem1.o minelem2.o \
|
||||
minus.o \
|
||||
mismtch0.o mismtch1.o mismtch2.o \
|
||||
mkheap0.o mkheap1.o \
|
||||
mmap1.o mmap2.o \
|
||||
modulus.o \
|
||||
mset1.o mset3.o mset4.o mset5.o \
|
||||
negate.o nequal.o \
|
||||
nextprm0.o nextprm1.o nextprm2.o \
|
||||
nthelem0.o nthelem1.o nthelem2.o \
|
||||
ostmit.o \
|
||||
pair0.o pair1.o pair2.o \
|
||||
parsrt0.o parsrt1.o parsrt2.o \
|
||||
parsrtc0.o parsrtc1.o parsrtc2.o \
|
||||
partsrt0.o \
|
||||
partsum0.o partsum1.o partsum2.o \
|
||||
pheap1.o pheap2.o \
|
||||
plus.o \
|
||||
pqueue1.o \
|
||||
prevprm0.o prevprm1.o prevprm2.o \
|
||||
ptition0.o ptition1.o \
|
||||
ptrbinf1.o ptrbinf2.o \
|
||||
ptrunf1.o ptrunf2.o \
|
||||
queue1.o \
|
||||
rawiter.o \
|
||||
remcopy1.o \
|
||||
remcpif1.o \
|
||||
remif1.o \
|
||||
remove1.o \
|
||||
repcpif1.o \
|
||||
replace0.o replace1.o replcpy1.o replif1.o \
|
||||
revbit1.o revbit2.o \
|
||||
revcopy1.o reverse1.o reviter1.o reviter2.o \
|
||||
rndshuf0.o rndshuf1.o rndshuf2.o \
|
||||
rotate0.o rotate1.o rotcopy0.o rotcopy1.o \
|
||||
search0.o search1.o search2.o \
|
||||
set1.o set2.o \
|
||||
setdiff0.o setdiff1.o setdiff2.o \
|
||||
setintr0.o setintr1.o setintr2.o \
|
||||
setsymd0.o setsymd1.o setsymd2.o \
|
||||
setunon0.o setunon1.o setunon2.o \
|
||||
sort1.o sort2.o \
|
||||
stack1.o stack2.o \
|
||||
stblptn0.o stblptn1.o \
|
||||
stblsrt1.o stblsrt2.o \
|
||||
swap1.o \
|
||||
swprnge1.o \
|
||||
times.o \
|
||||
trnsfrm1.o trnsfrm2.o \
|
||||
ucompos1.o ucompos2.o \
|
||||
unegate1.o unegate2.o \
|
||||
uniqcpy1.o uniqcpy2.o \
|
||||
unique1.o unique2.o \
|
||||
uprbnd1.o uprbnd2.o \
|
||||
vec1.o vec2.o vec3.o vec4.o vec5.o vec6.o vec7.o vec8.o \
|
||||
hmap1.o hmmap1.o hset2.o hmset1.o string1.o bitset1.o slist1.o
|
||||
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = CC
|
||||
CXX = $(CC)
|
||||
|
||||
CXXFLAGS = -D_STLP_HAS_NO_EXCEPTIONS -I. ${STL_INCL} ${DEBUG_FLAGS}
|
||||
#CXXFLAGS = -D_STLP_HAS_NO_EXCEPTIONS -D_STLP_DEBUG -I. ${STL_INCL} ${DEBUG_FLAGS}
|
||||
#CXXFLAGS = -hexceptions -I. ${STL_INCL} ${DEBUG_FLAGS}
|
||||
#CXXFLAGS = -hexceptions -D_STLP_DEBUG -I. ${STL_INCL} ${DEBUG_FLAGS}
|
||||
|
||||
|
||||
LIBS = -L ../../lib -lstlport -lpthread
|
||||
#LIBS = -L ../../lib -lstlport_stldebug -lpthread
|
||||
#LIBS = -L ../../lib -lstlportx -lpthread
|
||||
#LIBS = -L ../../lib -lstlport_stldebugx -lpthread
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) $(LIBS) $(OBJECTS) -o $(TEST_EXE)
|
||||
echo 'a string' | ./$(TEST_EXE) > $(TEST)
|
||||
|
||||
.SUFFIXES: .cpp .o .exe .out .res .s
|
||||
|
||||
.cpp.o:
|
||||
$(CXX) $(CXXFLAGS) $< -c -o $@
|
||||
|
||||
.cpp.out:
|
||||
$(CXX) $(CXXFLAGS) $< -c -USINGLE -DMAIN -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $(LIBS) $*.o -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) $(LIBS) -DMAIN $< -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
.cpp.s:
|
||||
$(CXX) $(CXXFLAGS) -S $< -o $@
|
||||
|
||||
|
||||
clean:
|
||||
-rm -fr *.exe *.o *.ii *.obj *.out *.s
|
||||
265
STLPORT/test/regression/deccxx.mak
Normal file
265
STLPORT/test/regression/deccxx.mak
Normal file
@@ -0,0 +1,265 @@
|
||||
# ;;; -*- Mode:makefile;-*-
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# This requires GNU make.
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
# point this to proper location
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
# This is for dumb native make
|
||||
OBJ_LIST = stl_test.o accum1.o accum2.o \
|
||||
adjdiff0.o adjdiff1.o adjdiff2.o \
|
||||
adjfind0.o adjfind1.o adjfind2.o \
|
||||
advance.o \
|
||||
alg1.o alg2.o alg3.o alg4.o alg5.o \
|
||||
bcompos1.o bcompos2.o \
|
||||
bind1st1.o bind1st2.o \
|
||||
bind2nd1.o bind2nd2.o \
|
||||
binsert1.o binsert2.o \
|
||||
binsrch1.o binsrch2.o \
|
||||
bnegate1.o bnegate2.o bvec1.o \
|
||||
copy1.o copy2.o copy3.o copy4.o \
|
||||
copyb.o copyb0.o \
|
||||
count0.o count1.o \
|
||||
countif1.o \
|
||||
deque1.o \
|
||||
divides.o \
|
||||
eqlrnge0.o eqlrnge1.o eqlrnge2.o \
|
||||
equal0.o equal1.o equal2.o \
|
||||
equalto.o \
|
||||
fill1.o filln1.o \
|
||||
find0.o find1.o \
|
||||
findif0.o findif1.o \
|
||||
finsert1.o finsert2.o \
|
||||
foreach0.o foreach1.o \
|
||||
func1.o func2.o func3.o \
|
||||
gener1.o gener2.o \
|
||||
genern1.o genern2.o \
|
||||
greateq.o greater.o \
|
||||
incl0.o incl1.o incl2.o \
|
||||
inplmrg1.o inplmrg2.o \
|
||||
inrprod0.o inrprod1.o inrprod2.o \
|
||||
insert1.o insert2.o \
|
||||
iota1.o \
|
||||
istmit1.o \
|
||||
iter1.o iter2.o iter3.o iter4.o \
|
||||
iterswp0.o iterswp1.o \
|
||||
less.o \
|
||||
lesseq.o \
|
||||
lexcmp1.o lexcmp2.o \
|
||||
list1.o list2.o list3.o list4.o \
|
||||
logicand.o logicnot.o \
|
||||
logicor.o \
|
||||
lwrbnd1.o lwrbnd2.o \
|
||||
map1.o \
|
||||
max1.o max2.o \
|
||||
maxelem1.o maxelem2.o \
|
||||
memfunptr.o \
|
||||
merge0.o merge1.o merge2.o \
|
||||
min1.o min2.o \
|
||||
minelem1.o minelem2.o \
|
||||
minus.o \
|
||||
mismtch0.o mismtch1.o mismtch2.o \
|
||||
mkheap0.o mkheap1.o \
|
||||
mmap1.o mmap2.o \
|
||||
modulus.o \
|
||||
mset1.o mset3.o mset4.o mset5.o \
|
||||
negate.o nequal.o \
|
||||
nextprm0.o nextprm1.o nextprm2.o \
|
||||
nthelem0.o nthelem1.o nthelem2.o \
|
||||
ostmit.o \
|
||||
pair0.o pair1.o pair2.o \
|
||||
parsrt0.o parsrt1.o parsrt2.o \
|
||||
parsrtc0.o parsrtc1.o parsrtc2.o \
|
||||
partsrt0.o \
|
||||
partsum0.o partsum1.o partsum2.o \
|
||||
pheap1.o pheap2.o \
|
||||
plus.o \
|
||||
pqueue1.o \
|
||||
prevprm0.o prevprm1.o prevprm2.o \
|
||||
ptition0.o ptition1.o \
|
||||
ptrbinf1.o ptrbinf2.o \
|
||||
ptrunf1.o ptrunf2.o \
|
||||
queue1.o \
|
||||
rawiter.o \
|
||||
remcopy1.o \
|
||||
remcpif1.o \
|
||||
remif1.o \
|
||||
remove1.o \
|
||||
repcpif1.o \
|
||||
replace0.o replace1.o replcpy1.o replif1.o \
|
||||
revbit1.o revbit2.o \
|
||||
revcopy1.o reverse1.o reviter1.o reviter2.o \
|
||||
rndshuf0.o rndshuf1.o rndshuf2.o \
|
||||
rotate0.o rotate1.o rotcopy0.o rotcopy1.o \
|
||||
search0.o search1.o search2.o \
|
||||
set1.o set2.o \
|
||||
setdiff0.o setdiff1.o setdiff2.o \
|
||||
setintr0.o setintr1.o setintr2.o \
|
||||
setsymd0.o setsymd1.o setsymd2.o \
|
||||
setunon0.o setunon1.o setunon2.o \
|
||||
sort1.o sort2.o \
|
||||
stack1.o stack2.o \
|
||||
stblptn0.o stblptn1.o \
|
||||
stblsrt1.o stblsrt2.o \
|
||||
swap1.o \
|
||||
swprnge1.o \
|
||||
times.o \
|
||||
trnsfrm1.o trnsfrm2.o \
|
||||
ucompos1.o ucompos2.o \
|
||||
unegate1.o unegate2.o \
|
||||
uniqcpy1.o uniqcpy2.o \
|
||||
unique1.o unique2.o \
|
||||
uprbnd1.o uprbnd2.o \
|
||||
vec1.o vec2.o vec3.o vec4.o vec5.o vec6.o vec7.o vec8.o \
|
||||
hmap1.o hmmap1.o hset2.o hmset1.o string1.o bitset1.o slist1.o
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmap1.cpp hmmap1.cpp hset2.cpp hmset1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
OBJECTS = $(OBJ_LIST)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = cxx
|
||||
CXX = $(CC)
|
||||
# CXXFLAGS = -O -w0 ${STL_INCL} -I.
|
||||
CXXFLAGS = ${STL_INCL} -std strict_ansi_errors -I. -D__NO_USE_STD_IOSTREAM -D_STLP_NO_OWN_IOSTREAMS -D_STLP_DEBUG
|
||||
|
||||
LIBS = -lm
|
||||
LIBSTDCXX =
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | $(TEST_EXE) > $(TEST)
|
||||
|
||||
.SUFFIXES: .cpp .i .o .exe .out .res
|
||||
|
||||
%.o : %.cpp
|
||||
$(CXX) $(CXXFLAGS) $*.cpp -c -o $@
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $*.cpp -c -USINGLE -DMAIN -g -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) istmit1.cpp $(STAT_MODULE) $(LIBSTDCXX) -lstdc++ $(LIBS) -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -O5 -S -pta -noex $*.cpp -o $@
|
||||
|
||||
clean:
|
||||
-rm -fr *.exe *.o *.rpo *.obj *.out cxx_repository
|
||||
41
STLPORT/test/regression/deque1.cpp
Normal file
41
STLPORT/test/regression/deque1.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <deque>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define deque1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
int deque1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of deque1_test:"<<endl;
|
||||
deque<int> d;
|
||||
d.push_back(4); // Add after end.
|
||||
d.push_back(9);
|
||||
d.push_back(16);
|
||||
d.push_front(1); // Insert at beginning.
|
||||
int i;
|
||||
for(i = 0; i < d.size(); i++)
|
||||
cout << "d[" << i << "] = " << d[i] << endl;
|
||||
cout << endl;
|
||||
|
||||
d.pop_front(); // Erase first element.
|
||||
|
||||
d[2] = 25; // Replace last element.
|
||||
for(i = 0; i < d.size(); i++)
|
||||
cout << "d[" << i << "] = " << d[i] << endl;
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
22
STLPORT/test/regression/divides.cpp
Normal file
22
STLPORT/test/regression/divides.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <numeric>
|
||||
|
||||
#ifdef MAIN
|
||||
#define divides_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int divides_test(int, char**)
|
||||
{
|
||||
cout<<"Results of divides_test:"<<endl;
|
||||
int input [3] = { 2, 3, 4 };
|
||||
|
||||
int result = accumulate(input, input + 3, 48, divides<int>());
|
||||
cout << "result = " << result << endl;
|
||||
return 0;
|
||||
}
|
||||
180
STLPORT/test/regression/djgpp.mak
Normal file
180
STLPORT/test/regression/djgpp.mak
Normal file
@@ -0,0 +1,180 @@
|
||||
# ;;; -*- Mode:makefile;-*-
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# This requires GNU make.
|
||||
|
||||
# Modified from gcc.mak by Tanes Sriviroolchai (tanes73@yahoo.com) for
|
||||
# using with DJGPP. It will use gcc to compile and link. While linking
|
||||
# if _STLP_NO_OWN_IOSTREAMS is defined, we need to link with libstdcxx
|
||||
# also.
|
||||
|
||||
.SUFFIXES: .cc .cpp .o .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
memfunptr.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
# STAT_MODULE=stat.o
|
||||
OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = gcc
|
||||
CXX = $(CC)
|
||||
|
||||
# DEBUG_FLAGS= -D_STLP_DEBUG
|
||||
|
||||
#CXXFLAGS = -Wall -D_STLP_NO_OWN_IOSTREAMS -D_STLP_WHOLE_NATIVE_STD -fhonor-std -D__HONOR_STD ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
CXXFLAGS = -Wall -mbnu210 -ftemplate-depth-32 -D_STLP_NO_OWN_IOSTREAMS ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
LIBS = ../../lib/libstlport_djgpp_static.a -lstdcxx -lm
|
||||
LIBSTDCXX =
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) ${REPO_FLAGS} $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | $(TEST_EXE) > $(TEST)
|
||||
|
||||
|
||||
.cc.o .cxx.o .C.o .cpp.o:
|
||||
${CXX} ${CXXFLAGS} ${DEBUG_FLAGS} ${REPO_FLAGS} -c -o $*.o $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN=1 $< -c -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $< $(STAT_MODULE) $(LIBSTDCXX) -lstdc++ $(LIBS) -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
$(STAT_MODULE): stat.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} -c $< -o $@
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -O3 -fno-exceptions -D_STLP_NO_EXCEPTIONS -S $< -o $*.s
|
||||
|
||||
%.i: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -E $< > $@
|
||||
|
||||
clean:
|
||||
-rm -rf *.exe *.out *.o *.rpo core *.out Templates.DB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
653
STLPORT/test/regression/dm.mak
Normal file
653
STLPORT/test/regression/dm.mak
Normal file
@@ -0,0 +1,653 @@
|
||||
.SUFFIXES: .cpp .c .o .so .a .exe .obj .output
|
||||
|
||||
# bug.cpp fstream1.cpp don't work for some reason
|
||||
|
||||
# bvec1.cpp seek.cpp and sstream1.cpp only work with the STLport
|
||||
# iostreams library
|
||||
|
||||
SRCS = accum1.cpp accum2.cpp adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp advance.cpp alg1.cpp \
|
||||
alg2.cpp alg3.cpp alg4.cpp alg5.cpp bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp binsrch1.cpp binsrch2.cpp \
|
||||
bitset1.cpp bnegate1.cpp bnegate2.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp countif1.cpp deque1.cpp divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp equal0.cpp equal1.cpp \
|
||||
equal2.cpp equalto.cpp fill1.cpp filln1.cpp find0.cpp \
|
||||
find1.cpp findif0.cpp findif1.cpp finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp func1.cpp func2.cpp \
|
||||
func3.cpp gener1.cpp gener2.cpp genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp hmap1.cpp hmmap1.cpp hmset1.cpp \
|
||||
hset2.cpp incl0.cpp incl1.cpp incl2.cpp inplmrg1.cpp \
|
||||
inplmrg2.cpp inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp iota1.cpp istmit1.cpp iter1.cpp \
|
||||
iter2.cpp iter3.cpp iter4.cpp iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp lesseq.cpp lexcmp1.cpp lexcmp2.cpp list1.cpp \
|
||||
list2.cpp list3.cpp list4.cpp logicand.cpp logicnot.cpp \
|
||||
logicor.cpp lwrbnd1.cpp lwrbnd2.cpp map1.cpp max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp memfunptr.cpp merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp minelem1.cpp minelem2.cpp minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp modulus.cpp mset1.cpp mset3.cpp mset4.cpp \
|
||||
mset5.cpp negate.cpp nequal.cpp nextprm0.cpp nextprm1.cpp \
|
||||
nextprm2.cpp nthelem0.cpp nthelem1.cpp nthelem2.cpp ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp parsrt0.cpp parsrt1.cpp \
|
||||
parsrt2.cpp parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp partsum0.cpp partsum1.cpp partsum2.cpp pheap1.cpp \
|
||||
pheap2.cpp plus.cpp pqueue1.cpp prevprm0.cpp prevprm1.cpp \
|
||||
prevprm2.cpp ptition0.cpp ptition1.cpp ptrbinf1.cpp \
|
||||
ptrbinf2.cpp ptrunf1.cpp ptrunf2.cpp queue1.cpp rawiter.cpp \
|
||||
remcopy1.cpp remcpif1.cpp remif1.cpp remove1.cpp repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp revbit1.cpp \
|
||||
revbit2.cpp revcopy1.cpp reverse1.cpp reviter1.cpp \
|
||||
reviter2.cpp rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp search0.cpp \
|
||||
search1.cpp search2.cpp set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp setintr0.cpp \
|
||||
setintr1.cpp setintr2.cpp setsymd0.cpp setsymd1.cpp \
|
||||
setsymd2.cpp setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
slist1.cpp sort1.cpp sort2.cpp stack1.cpp \
|
||||
stack2.cpp stat.cpp stblptn0.cpp stblptn1.cpp stblsrt1.cpp \
|
||||
stblsrt2.cpp strass1.cpp \
|
||||
string1.cpp swap1.cpp swprnge1.cpp times.cpp trnsfrm1.cpp \
|
||||
trnsfrm2.cpp tstdeq.cpp ucompos1.cpp ucompos2.cpp unegate1.cpp \
|
||||
unegate2.cpp uniqcpy1.cpp uniqcpy2.cpp unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp vec1.cpp vec2.cpp vec3.cpp vec4.cpp \
|
||||
vec5.cpp vec6.cpp vec7.cpp vec8.cpp
|
||||
|
||||
|
||||
.cpp.exe:
|
||||
dmc -Ae -Ar -DMAIN -I../../stlport $<
|
||||
|
||||
all: $(SRCS:.cpp=.exe)
|
||||
# -*- Makefile -*-
|
||||
.SUFFIXES: .cpp .c .obj .dll .exe .rc .res
|
||||
|
||||
|
||||
CXX=dmc
|
||||
CC=dmc -cpp
|
||||
LIB=lib
|
||||
LINK=dmc
|
||||
RC=rcc
|
||||
|
||||
LIB_BASENAME=stlp45dm
|
||||
|
||||
OBJS = build\c_locale.obj build\c_locale_stub.obj build\codecvt.obj \
|
||||
build\collate.obj build\complex.obj build\complex_exp.obj \
|
||||
build\complex_io.obj build\complex_io_w.obj build\complex_trig.obj \
|
||||
build\ctype.obj build\dll_main.obj \
|
||||
build\facets_byname.obj build\fstream.obj build\ios.obj \
|
||||
build\iostream.obj build\istream.obj build\locale.obj \
|
||||
build\locale_catalog.obj build\locale_impl.obj \
|
||||
build\messages.obj build\monetary.obj build\num_get.obj \
|
||||
build\num_get_float.obj build\num_put.obj \
|
||||
build\num_put_float.obj build\numpunct.obj build\ostream.obj \
|
||||
build\sstream.obj build\stdio_streambuf.obj \
|
||||
build\streambuf.obj build\string_w.obj build\strstream.obj \
|
||||
build\time_facets.obj
|
||||
|
||||
BUILD_DIRS=..\lib ..\build \
|
||||
..\build\static ..\build\static\release \
|
||||
..\build\static\debug ..\build\static\stldebug \
|
||||
..\build\staticx ..\build\staticx\release \
|
||||
..\build\staticx\debug ..\build\staticx\stldebug \
|
||||
..\build\dynamic ..\build\dynamic\release \
|
||||
..\build\dynamic\debug ..\build\dynamic\stldebug \
|
||||
..\build\sdynamic ..\build\sdynamic\release \
|
||||
..\build\sdynamic\debug ..\build\sdynamic\stldebug
|
||||
|
||||
|
||||
CXXFLAGS_COMMON = -Ae -Ar -DSTRICT -D__BUILDING_STLPORT -I../stlport
|
||||
|
||||
# four versions are currently supported:
|
||||
# - static: static STLport library, static RTL
|
||||
# - staticx: static STLport library, dynamic RTL
|
||||
# - dynamic: dynamic STLport library, dynamic RTL
|
||||
# - sdynamic: dynamic STLport library, static RTL
|
||||
|
||||
CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -Nc -o+all -D_MT
|
||||
CXXFLAGS_RELEASE_staticx = $(CXXFLAGS_COMMON) -Nc -o+all -ND
|
||||
CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -WD -o+all -ND
|
||||
CXXFLAGS_RELEASE_sdynamic = $(CXXFLAGS_COMMON) -WD -o+all -D_MT
|
||||
|
||||
CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -Nc -g -D_MT
|
||||
CXXFLAGS_DEBUG_staticx = $(CXXFLAGS_COMMON) -Nc -g -ND
|
||||
CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -WD -g -ND
|
||||
CXXFLAGS_DEBUG_sdynamic = $(CXXFLAGS_COMMON) -WD -g -D_MT
|
||||
|
||||
CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
|
||||
CXXFLAGS_STLDEBUG_staticx = $(CXXFLAGS_DEBUG_staticx) -D_STLP_DEBUG
|
||||
CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
|
||||
CXXFLAGS_STLDEBUG_sdynamic = $(CXXFLAGS_DEBUG_sdynamic) -D_STLP_DEBUG
|
||||
|
||||
|
||||
.cpp{..\build\static\release}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_RELEASE_static) "$<"
|
||||
|
||||
.cpp{..\build\static\debug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_DEBUG_static) "$<"
|
||||
|
||||
.cpp{..\build\static\stldebug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_STLDEBUG_static) "$<"
|
||||
|
||||
.cpp{..\build\staticx\release}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_RELEASE_staticx) "$<"
|
||||
|
||||
.cpp{..\build\staticx\debug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_DEBUG_staticx) "$<"
|
||||
|
||||
.cpp{..\build\staticx\stldebug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_STLDEBUG_staticx) "$<"
|
||||
|
||||
.cpp{..\build\dynamic\release}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_RELEASE_dynamic) "$<"
|
||||
|
||||
.cpp{..\build\dynamic\debug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_DEBUG_dynamic) "$<"
|
||||
|
||||
.cpp{..\build\dynamic\stldebug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_STLDEBUG_dynamic) "$<"
|
||||
|
||||
.cpp{..\build\sdynamic\release}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_RELEASE_sdynamic) "$<"
|
||||
|
||||
.cpp{..\build\sdynamic\debug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_DEBUG_sdynamic) "$<"
|
||||
|
||||
.cpp{..\build\sdynamic\stldebug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_STLDEBUG_sdynamic) "$<"
|
||||
|
||||
.c{..\build\static\release}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_RELEASE_static) "$<"
|
||||
|
||||
.c{..\build\static\debug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_DEBUG_static) "$<"
|
||||
|
||||
.c{..\build\static\stldebug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_STLDEBUG_static) "$<"
|
||||
|
||||
.c{..\build\staticx\release}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_RELEASE_staticx) "$<"
|
||||
|
||||
.c{..\build\staticx\debug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_DEBUG_staticx) "$<"
|
||||
|
||||
.c{..\build\staticx\stldebug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_STLDEBUG_staticx) "$<"
|
||||
|
||||
.c{..\build\dynamic\release}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_RELEASE_dynamic) "$<"
|
||||
|
||||
.c{..\build\dynamic\debug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_DEBUG_dynamic) "$<"
|
||||
|
||||
.c{..\build\dynamic\stldebug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_STLDEBUG_dynamic) "$<"
|
||||
|
||||
.c{..\build\sdynamic\release}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_RELEASE_sdynamic) "$<"
|
||||
|
||||
.c{..\build\sdynamic\debug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_DEBUG_sdynamic) "$<"
|
||||
|
||||
.c{..\build\sdynamic\stldebug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_STLDEBUG_sdynamic) "$<"
|
||||
|
||||
|
||||
.rc{..\build}.res:
|
||||
$(RC) -32 -o"$@" "$<"
|
||||
|
||||
|
||||
all: directories all_static all_staticx all_dynamic all_sdynamic
|
||||
|
||||
|
||||
directories: $(BUILD_DIRS)
|
||||
|
||||
$(BUILD_DIRS):
|
||||
mkdir $@
|
||||
|
||||
|
||||
all_static: ..\lib\$(LIB_BASENAME)_static.lib ..\lib\$(LIB_BASENAME)_debug_static.lib ..\lib\$(LIB_BASENAME)_stldebug_static.lib
|
||||
|
||||
..\lib\$(LIB_BASENAME)_static.lib: $(OBJS:build\=..\build\static\release\)
|
||||
*$(LIB) -c -n -p64 "$@" "$**"
|
||||
|
||||
..\lib\$(LIB_BASENAME)_debug_static.lib: $(OBJS:build\=..\build\static\debug\)
|
||||
*$(LIB) -c -n -p128 "$@" "$**"
|
||||
|
||||
..\lib\$(LIB_BASENAME)_stldebug_static.lib: $(OBJS:build\=..\build\static\stldebug\)
|
||||
*$(LIB) -c -n -p256 "$@" "$**"
|
||||
|
||||
|
||||
all_staticx: ..\lib\$(LIB_BASENAME)_staticx.lib ..\lib\$(LIB_BASENAME)_debug_staticx.lib ..\lib\$(LIB_BASENAME)_stldebug_staticx.lib
|
||||
|
||||
..\lib\$(LIB_BASENAME)_staticx.lib: $(OBJS:build\=..\build\staticx\release\)
|
||||
*$(LIB) -c -n -p64 "$@" "$**"
|
||||
|
||||
..\lib\$(LIB_BASENAME)_debug_staticx.lib: $(OBJS:build\=..\build\staticx\debug\)
|
||||
*$(LIB) -c -n -p128 "$@" "$**"
|
||||
|
||||
..\lib\$(LIB_BASENAME)_stldebug_staticx.lib: $(OBJS:build\=..\build\staticx\stldebug\)
|
||||
*$(LIB) -c -n -p256 "$@" "$**"
|
||||
|
||||
|
||||
all_dynamic: ..\lib\$(LIB_BASENAME).dll ..\lib\$(LIB_BASENAME)_debug.dll ..\lib\$(LIB_BASENAME)_stldebug.dll
|
||||
|
||||
..\lib\$(LIB_BASENAME).dll: $(OBJS:build\=..\build\dynamic\release\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -L/IMPLIB:$(@R).lib -L/DE -L/NODEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
..\lib\$(LIB_BASENAME)_debug.dll: $(OBJS:build\=..\build\dynamic\debug\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -g -L/IMPLIB:$(@R).lib -L/DE -L/DEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
..\lib\$(LIB_BASENAME)_stldebug.dll: $(OBJS:build\=..\build\dynamic\stldebug\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -g -L/IMPLIB:$(@R).lib -L/DE -L/DEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
|
||||
all_sdynamic: ..\lib\$(LIB_BASENAME)s.dll ..\lib\$(LIB_BASENAME)s_debug.dll ..\lib\$(LIB_BASENAME)s_stldebug.dll
|
||||
|
||||
..\lib\$(LIB_BASENAME)s.dll: $(OBJS:build\=..\build\sdynamic\release\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -L/IMPLIB:$(@R).lib -L/DE -L/NODEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
..\lib\$(LIB_BASENAME)s_debug.dll: $(OBJS:build\=..\build\sdynamic\debug\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -g -L/IMPLIB:$(@R).lib -L/DE -L/DEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
..\lib\$(LIB_BASENAME)s_stldebug.dll: $(OBJS:build\=..\build\sdynamic\stldebug\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -g -L/IMPLIB:$(@R).lib -L/DE -L/DEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
# -*- Makefile -*-
|
||||
.SUFFIXES: .cpp .c .obj .dll .exe .rc .res
|
||||
|
||||
|
||||
CXX=dmc
|
||||
CC=dmc -cpp
|
||||
LIB=lib
|
||||
LINK=dmc
|
||||
RC=rcc
|
||||
|
||||
LIB_BASENAME=stlp45dm
|
||||
|
||||
OBJS = build\c_locale.obj build\c_locale_stub.obj build\codecvt.obj \
|
||||
build\collate.obj build\complex.obj build\complex_exp.obj \
|
||||
build\complex_io.obj build\complex_io_w.obj build\complex_trig.obj \
|
||||
build\ctype.obj build\dll_main.obj \
|
||||
build\facets_byname.obj build\fstream.obj build\ios.obj \
|
||||
build\iostream.obj build\istream.obj build\locale.obj \
|
||||
build\locale_catalog.obj build\locale_impl.obj \
|
||||
build\messages.obj build\monetary.obj build\num_get.obj \
|
||||
build\num_get_float.obj build\num_put.obj \
|
||||
build\num_put_float.obj build\numpunct.obj build\ostream.obj \
|
||||
build\sstream.obj build\stdio_streambuf.obj \
|
||||
build\streambuf.obj build\string_w.obj build\strstream.obj \
|
||||
build\time_facets.obj
|
||||
|
||||
BUILD_DIRS=..\lib ..\build \
|
||||
..\build\static ..\build\static\release \
|
||||
..\build\static\debug ..\build\static\stldebug \
|
||||
..\build\staticx ..\build\staticx\release \
|
||||
..\build\staticx\debug ..\build\staticx\stldebug \
|
||||
..\build\dynamic ..\build\dynamic\release \
|
||||
..\build\dynamic\debug ..\build\dynamic\stldebug \
|
||||
..\build\sdynamic ..\build\sdynamic\release \
|
||||
..\build\sdynamic\debug ..\build\sdynamic\stldebug
|
||||
|
||||
|
||||
CXXFLAGS_COMMON = -Ae -Ar -DSTRICT -D__BUILDING_STLPORT -I../stlport
|
||||
|
||||
# four versions are currently supported:
|
||||
# - static: static STLport library, static RTL
|
||||
# - staticx: static STLport library, dynamic RTL
|
||||
# - dynamic: dynamic STLport library, dynamic RTL
|
||||
# - sdynamic: dynamic STLport library, static RTL
|
||||
|
||||
CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -Nc -o+all -D_MT
|
||||
CXXFLAGS_RELEASE_staticx = $(CXXFLAGS_COMMON) -Nc -o+all -ND
|
||||
CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -WD -o+all -ND
|
||||
CXXFLAGS_RELEASE_sdynamic = $(CXXFLAGS_COMMON) -WD -o+all -D_MT
|
||||
|
||||
CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -Nc -g -D_MT
|
||||
CXXFLAGS_DEBUG_staticx = $(CXXFLAGS_COMMON) -Nc -g -ND
|
||||
CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -WD -g -ND
|
||||
CXXFLAGS_DEBUG_sdynamic = $(CXXFLAGS_COMMON) -WD -g -D_MT
|
||||
|
||||
CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG
|
||||
CXXFLAGS_STLDEBUG_staticx = $(CXXFLAGS_DEBUG_staticx) -D_STLP_DEBUG
|
||||
CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG
|
||||
CXXFLAGS_STLDEBUG_sdynamic = $(CXXFLAGS_DEBUG_sdynamic) -D_STLP_DEBUG
|
||||
|
||||
|
||||
.cpp{..\build\static\release}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_RELEASE_static) "$<"
|
||||
|
||||
.cpp{..\build\static\debug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_DEBUG_static) "$<"
|
||||
|
||||
.cpp{..\build\static\stldebug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_STLDEBUG_static) "$<"
|
||||
|
||||
.cpp{..\build\staticx\release}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_RELEASE_staticx) "$<"
|
||||
|
||||
.cpp{..\build\staticx\debug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_DEBUG_staticx) "$<"
|
||||
|
||||
.cpp{..\build\staticx\stldebug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_STLDEBUG_staticx) "$<"
|
||||
|
||||
.cpp{..\build\dynamic\release}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_RELEASE_dynamic) "$<"
|
||||
|
||||
.cpp{..\build\dynamic\debug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_DEBUG_dynamic) "$<"
|
||||
|
||||
.cpp{..\build\dynamic\stldebug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_STLDEBUG_dynamic) "$<"
|
||||
|
||||
.cpp{..\build\sdynamic\release}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_RELEASE_sdynamic) "$<"
|
||||
|
||||
.cpp{..\build\sdynamic\debug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_DEBUG_sdynamic) "$<"
|
||||
|
||||
.cpp{..\build\sdynamic\stldebug}.obj:
|
||||
$(CXX) -c -o"$@" $(CXXFLAGS_STLDEBUG_sdynamic) "$<"
|
||||
|
||||
.c{..\build\static\release}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_RELEASE_static) "$<"
|
||||
|
||||
.c{..\build\static\debug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_DEBUG_static) "$<"
|
||||
|
||||
.c{..\build\static\stldebug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_STLDEBUG_static) "$<"
|
||||
|
||||
.c{..\build\staticx\release}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_RELEASE_staticx) "$<"
|
||||
|
||||
.c{..\build\staticx\debug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_DEBUG_staticx) "$<"
|
||||
|
||||
.c{..\build\staticx\stldebug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_STLDEBUG_staticx) "$<"
|
||||
|
||||
.c{..\build\dynamic\release}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_RELEASE_dynamic) "$<"
|
||||
|
||||
.c{..\build\dynamic\debug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_DEBUG_dynamic) "$<"
|
||||
|
||||
.c{..\build\dynamic\stldebug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_STLDEBUG_dynamic) "$<"
|
||||
|
||||
.c{..\build\sdynamic\release}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_RELEASE_sdynamic) "$<"
|
||||
|
||||
.c{..\build\sdynamic\debug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_DEBUG_sdynamic) "$<"
|
||||
|
||||
.c{..\build\sdynamic\stldebug}.obj:
|
||||
$(CC) -c -o"$@" $(CXXFLAGS_STLDEBUG_sdynamic) "$<"
|
||||
|
||||
|
||||
.rc{..\build}.res:
|
||||
$(RC) -32 -o"$@" "$<"
|
||||
|
||||
|
||||
all: directories all_static all_staticx all_dynamic all_sdynamic
|
||||
|
||||
|
||||
directories: $(BUILD_DIRS)
|
||||
|
||||
$(BUILD_DIRS):
|
||||
mkdir $@
|
||||
|
||||
|
||||
all_static: ..\lib\$(LIB_BASENAME)_static.lib ..\lib\$(LIB_BASENAME)_debug_static.lib ..\lib\$(LIB_BASENAME)_stldebug_static.lib
|
||||
|
||||
..\lib\$(LIB_BASENAME)_static.lib: $(OBJS:build\=..\build\static\release\)
|
||||
*$(LIB) -c -n -p64 "$@" "$**"
|
||||
|
||||
..\lib\$(LIB_BASENAME)_debug_static.lib: $(OBJS:build\=..\build\static\debug\)
|
||||
*$(LIB) -c -n -p128 "$@" "$**"
|
||||
|
||||
..\lib\$(LIB_BASENAME)_stldebug_static.lib: $(OBJS:build\=..\build\static\stldebug\)
|
||||
*$(LIB) -c -n -p256 "$@" "$**"
|
||||
|
||||
|
||||
all_staticx: ..\lib\$(LIB_BASENAME)_staticx.lib ..\lib\$(LIB_BASENAME)_debug_staticx.lib ..\lib\$(LIB_BASENAME)_stldebug_staticx.lib
|
||||
|
||||
..\lib\$(LIB_BASENAME)_staticx.lib: $(OBJS:build\=..\build\staticx\release\)
|
||||
*$(LIB) -c -n -p64 "$@" "$**"
|
||||
|
||||
..\lib\$(LIB_BASENAME)_debug_staticx.lib: $(OBJS:build\=..\build\staticx\debug\)
|
||||
*$(LIB) -c -n -p128 "$@" "$**"
|
||||
|
||||
..\lib\$(LIB_BASENAME)_stldebug_staticx.lib: $(OBJS:build\=..\build\staticx\stldebug\)
|
||||
*$(LIB) -c -n -p256 "$@" "$**"
|
||||
|
||||
|
||||
all_dynamic: ..\lib\$(LIB_BASENAME).dll ..\lib\$(LIB_BASENAME)_debug.dll ..\lib\$(LIB_BASENAME)_stldebug.dll
|
||||
|
||||
..\lib\$(LIB_BASENAME).dll: $(OBJS:build\=..\build\dynamic\release\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -L/IMPLIB:$(@R).lib -L/DE -L/NODEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
..\lib\$(LIB_BASENAME)_debug.dll: $(OBJS:build\=..\build\dynamic\debug\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -g -L/IMPLIB:$(@R).lib -L/DE -L/DEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
..\lib\$(LIB_BASENAME)_stldebug.dll: $(OBJS:build\=..\build\dynamic\stldebug\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -g -L/IMPLIB:$(@R).lib -L/DE -L/DEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
|
||||
all_sdynamic: ..\lib\$(LIB_BASENAME)s.dll ..\lib\$(LIB_BASENAME)s_debug.dll ..\lib\$(LIB_BASENAME)s_stldebug.dll
|
||||
|
||||
..\lib\$(LIB_BASENAME)s.dll: $(OBJS:build\=..\build\sdynamic\release\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -L/IMPLIB:$(@R).lib -L/DE -L/NODEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
..\lib\$(LIB_BASENAME)s_debug.dll: $(OBJS:build\=..\build\sdynamic\debug\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -g -L/IMPLIB:$(@R).lib -L/DE -L/DEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
|
||||
..\lib\$(LIB_BASENAME)s_stldebug.dll: $(OBJS:build\=..\build\sdynamic\stldebug\) ..\build\stlport.res
|
||||
*$(LINK) -WD -ND -g -L/IMPLIB:$(@R).lib -L/DE -L/DEBUG -o"$@" "$**" user32.lib kernel32.lib <<$(@R).def
|
||||
LIBRARY "$(@F)"
|
||||
DESCRIPTION 'STLport DLL for Digital Mars C/C++'
|
||||
EXETYPE NT
|
||||
SUBSYSTEM WINDOWS
|
||||
CODE SHARED EXECUTE
|
||||
DATA READWRITE
|
||||
|
||||
EXPORTS
|
||||
"?cin@std@@3V?$basic_istream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cout@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?cerr@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?clog@std@@3V?$basic_ostream@std@DV?$char_traits@std@D@1@@1@A"
|
||||
"?wcin@std@@3V?$basic_istream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcout@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wcerr@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
"?wclog@std@@3V?$basic_ostream@std@_YV?$char_traits@std@_Y@1@@1@A"
|
||||
<<
|
||||
164
STLPORT/test/regression/egcs.mak
Normal file
164
STLPORT/test/regression/egcs.mak
Normal file
@@ -0,0 +1,164 @@
|
||||
# ;;; -*- Mode:makefile;-*-
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# This requires GNU make.
|
||||
.SUFFIXES: .cc .cpp .o .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
memfunptr.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
# STAT_MODULE=stat.o
|
||||
OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = egcs-c++
|
||||
CXX = $(CC)
|
||||
|
||||
# DEBUG_FLAGS= -D_STLP_DEBUG
|
||||
|
||||
CXXFLAGS = -Wall -O ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
LIBS = -lm
|
||||
LIBSTDCXX =
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) ${REPO_FLAGS} $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | $(TEST_EXE) > $(TEST)
|
||||
|
||||
|
||||
.cc.o .cxx.o .C.o .cpp.o:
|
||||
${CXX} ${CXXFLAGS} ${DEBUG_FLAGS} ${REPO_FLAGS} -c -o $*.o $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN=1 $< -c -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $< $(STAT_MODULE) $(LIBSTDCXX) -lstdc++ $(LIBS) -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
$(STAT_MODULE): stat.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} -c $< -o $@
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -O3 -fno-exceptions -D_STLP_NO_EXCEPTIONS -S $< -o $*.s
|
||||
|
||||
clean:
|
||||
-rm -rf *.exe *.out *.o *.rpo core *.out Templates.DB
|
||||
27
STLPORT/test/regression/eqlrnge0.cpp
Normal file
27
STLPORT/test/regression/eqlrnge0.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define eqlrnge0_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int eqlrnge0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of eqlrnge0_test:"<<endl;
|
||||
int numbers[10] = { 0, 0, 1, 1, 2, 2, 2, 2, 3, 3 };
|
||||
|
||||
pair <int*, int*> range = equal_range((int*)numbers, (int*)numbers + 10, 2);
|
||||
cout
|
||||
<< "2 can be inserted from before index "
|
||||
<<(range.first - numbers)
|
||||
<< " to before index "
|
||||
<<(range.second - numbers)
|
||||
<< endl;
|
||||
return 0;
|
||||
}
|
||||
35
STLPORT/test/regression/eqlrnge1.cpp
Normal file
35
STLPORT/test/regression/eqlrnge1.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define eqlrnge1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int eqlrnge1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of eqlrnge1_test:"<<endl;
|
||||
typedef vector <int> IntVec;
|
||||
IntVec v(10);
|
||||
for(int i = 0; i < v.size(); i++)
|
||||
v[i] = i / 3;
|
||||
ostream_iterator<int> iter(cout, " ");
|
||||
cout << "Within the collection:\n\t";
|
||||
copy(v.begin(), v.end(), iter);
|
||||
pair <IntVec::iterator, IntVec::iterator> range =
|
||||
equal_range(v.begin(), v.end(), 2);
|
||||
cout
|
||||
<< "\n2 can be inserted from before index "
|
||||
<<(range.first - v.begin())
|
||||
<< " to before index "
|
||||
<<(range.second - v.begin())
|
||||
<< endl;
|
||||
return 0;
|
||||
}
|
||||
35
STLPORT/test/regression/eqlrnge2.cpp
Normal file
35
STLPORT/test/regression/eqlrnge2.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define eqlrnge2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int eqlrnge2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of eqlrnge2_test:"<<endl;
|
||||
char chars[] = "aabbccddggghhklllmqqqqssyyzz";
|
||||
|
||||
const unsigned count = sizeof(chars) - 1;
|
||||
ostream_iterator<char> iter(cout);
|
||||
cout << "Within the collection:\n\t";
|
||||
copy(chars, chars + count, iter);
|
||||
pair <char*, char*> range =
|
||||
equal_range((char*)chars, (char*)chars + count, 'q', less<char>());
|
||||
cout
|
||||
<< "\nq can be inserted from before index "
|
||||
<<(range.first - chars)
|
||||
<< " to before index "
|
||||
<<(range.second - chars)
|
||||
<< endl;
|
||||
return 0;
|
||||
}
|
||||
30
STLPORT/test/regression/equal0.cpp
Normal file
30
STLPORT/test/regression/equal0.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define equal0_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int equal0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of equal0_test:"<<endl;
|
||||
int numbers1[5] = { 1, 2, 3, 4, 5 };
|
||||
int numbers2[5] = { 1, 2, 4, 8, 16 };
|
||||
int numbers3[2] = { 1, 2 };
|
||||
|
||||
if(equal(numbers1, numbers1 + 5, numbers2))
|
||||
cout << "numbers1 is equal to numbers2" << endl;
|
||||
else
|
||||
cout << "numbers1 is not equal to numbers2" << endl;
|
||||
if(equal(numbers3, numbers3 + 2, numbers1))
|
||||
cout << "numbers3 is equal to numbers1" << endl;
|
||||
else
|
||||
cout << "numbers3 is not equal to numbers1" << endl;
|
||||
return 0;
|
||||
}
|
||||
32
STLPORT/test/regression/equal1.cpp
Normal file
32
STLPORT/test/regression/equal1.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define equal1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int equal1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of equal1_test:"<<endl;
|
||||
vector <int> v1(10);
|
||||
for(int i = 0; i < v1.size(); i++)
|
||||
v1[i] = i;
|
||||
vector <int> v2(10);
|
||||
if(equal(v1.begin(), v1.end(), v2.begin()))
|
||||
cout << "v1 is equal to v2" << endl;
|
||||
else
|
||||
cout << "v1 is not equal to v2" << endl;
|
||||
copy(v1.begin(), v1.end(), v2.begin());
|
||||
if(equal(v1.begin(), v1.end(), v2.begin()))
|
||||
cout << "v1 is equal to v2" << endl;
|
||||
else
|
||||
cout << "v1 is not equal to v2" << endl;
|
||||
return 0;
|
||||
}
|
||||
35
STLPORT/test/regression/equal2.cpp
Normal file
35
STLPORT/test/regression/equal2.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define equal2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
bool values_squared(int a_, int b_)
|
||||
{
|
||||
return(a_ * a_ == b_);
|
||||
}
|
||||
int equal2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of equal2_test:"<<endl;
|
||||
|
||||
vector <int> v1(10);
|
||||
vector <int> v2(10);
|
||||
for(int i = 0; i < v1.size(); i++)
|
||||
{
|
||||
v1[i] = i;
|
||||
v2[i] = i * i;
|
||||
}
|
||||
if(equal(v1.begin(), v1.end(), v2.begin(), values_squared))
|
||||
cout << "v2[i] == v1[i] * v1[i]" << endl;
|
||||
else
|
||||
cout << "v2[i] != v1[i] * v1[i]" << endl;
|
||||
return 0;
|
||||
}
|
||||
27
STLPORT/test/regression/equalto.cpp
Normal file
27
STLPORT/test/regression/equalto.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define equalto_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int equalto_test(int, char**)
|
||||
{
|
||||
cout<<"Results of equalto_test:"<<endl;
|
||||
int input1 [4] = { 1, 7, 2, 2 };
|
||||
int input2 [4] = { 1, 6, 2, 3 };
|
||||
|
||||
int output [4];
|
||||
transform((int*)input1, (int*)input1 + 4, (int*)input2, (int*)output, equal_to<int>());
|
||||
for(int i = 0; i < 4; i++)
|
||||
cout << output[i] << endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
81
STLPORT/test/regression/fadapter.h
Normal file
81
STLPORT/test/regression/fadapter.h
Normal file
@@ -0,0 +1,81 @@
|
||||
#ifndef _fadapter_h_
|
||||
#define _fadapter_h_
|
||||
|
||||
#include <functional>
|
||||
|
||||
// used as adaptor's return/argument type,
|
||||
// to allow binders/composers usage
|
||||
struct __void_tag {};
|
||||
|
||||
# if !defined (STLPORT) || defined (__STL_USE_NAMESPACES)
|
||||
using std::unary_function;
|
||||
# endif
|
||||
|
||||
template <class Result>
|
||||
class pointer_to_void_function {
|
||||
protected:
|
||||
Result (*ptr)();
|
||||
public:
|
||||
explicit pointer_to_void_function(Result (*x)()) : ptr(x) {}
|
||||
Result operator()() const { return ptr(); }
|
||||
Result operator()(__void_tag) const { return ptr(); }
|
||||
};
|
||||
|
||||
// to feed composers
|
||||
template <class Arg1>
|
||||
struct projectvoid :
|
||||
public unary_function<Arg1,__void_tag> {
|
||||
__void_tag operator()(const Arg1& x) const { return __void_tag(); }
|
||||
};
|
||||
|
||||
# if !defined (_STLP_MEMBER_POINTER_PARAM_BUG)
|
||||
|
||||
template <class Result>
|
||||
pointer_to_void_function<Result> ptr_fun(Result (*x)()) {
|
||||
return pointer_to_void_function<Result>(x);
|
||||
}
|
||||
|
||||
// alternate name
|
||||
template <class Result>
|
||||
pointer_to_void_function<Result> ptr_gen(Result (*x)()) {
|
||||
return pointer_to_void_function<Result>(x);
|
||||
}
|
||||
|
||||
# endif /* !defined (__STL_MEMBER_POINTER_PARAM_BUG) */
|
||||
|
||||
|
||||
template <class Arg>
|
||||
class pointer_to_unary_procedure /* :public unary_function<Arg, __void_tag> */ {
|
||||
protected:
|
||||
typedef void (*fun_type)(Arg);
|
||||
fun_type ptr;
|
||||
public:
|
||||
typedef Arg argument_type;
|
||||
pointer_to_unary_procedure() {}
|
||||
pointer_to_unary_procedure(fun_type x) : ptr(x) {}
|
||||
void operator() (Arg x) const { ptr(x); }
|
||||
};
|
||||
template <class Arg>
|
||||
inline pointer_to_unary_procedure<Arg> ptr_proc(void (*x)(Arg)) {
|
||||
return pointer_to_unary_procedure<Arg>(x);
|
||||
}
|
||||
|
||||
template <class Arg1, class Arg2>
|
||||
class pointer_to_binary_procedure /* : public unary_function<Arg1, Arg2, __void_tag> */ {
|
||||
protected:
|
||||
typedef void (*fun_type)(Arg1, Arg2);
|
||||
fun_type ptr;
|
||||
public:
|
||||
typedef Arg1 first_argument_type;
|
||||
typedef Arg2 second_argument_type;
|
||||
pointer_to_binary_procedure() {}
|
||||
pointer_to_binary_procedure(fun_type x) : ptr(x) {}
|
||||
void operator() (Arg1 x, Arg2 y) const { ptr(x, y); }
|
||||
};
|
||||
template <class Arg1, class Arg2>
|
||||
inline pointer_to_binary_procedure<Arg1, Arg2> ptr_proc(void (*x)(Arg1, Arg2)) {
|
||||
return pointer_to_binary_procedure<Arg1, Arg2>(x);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
21
STLPORT/test/regression/fib.h
Normal file
21
STLPORT/test/regression/fib.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef _fib_h
|
||||
#define _fib_h
|
||||
class Fibonacci
|
||||
{
|
||||
public:
|
||||
Fibonacci() : v1(0), v2(1) {}
|
||||
inline int operator()();
|
||||
private:
|
||||
int v1;
|
||||
int v2;
|
||||
};
|
||||
|
||||
inline int
|
||||
Fibonacci::operator()()
|
||||
{
|
||||
int r = v1 + v2;
|
||||
v1 = v2;
|
||||
v2 = r;
|
||||
return v1;
|
||||
}
|
||||
#endif // _fib_h
|
||||
24
STLPORT/test/regression/fill1.cpp
Normal file
24
STLPORT/test/regression/fill1.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define fill1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int fill1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of fill1_test:"<<endl;
|
||||
vector <int> v(10);
|
||||
fill(v.begin(), v.end(), 42);
|
||||
for(int i = 0; i < 10; i++)
|
||||
cout << v[i] << ' ';
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
24
STLPORT/test/regression/filln1.cpp
Normal file
24
STLPORT/test/regression/filln1.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define filln1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int filln1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of filln1_test:"<<endl;
|
||||
vector <int> v(10);
|
||||
fill_n(v.begin(), v.size(), 42);
|
||||
for(int i = 0; i < 10; i++)
|
||||
cout << v[i] << ' ';
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
23
STLPORT/test/regression/find0.cpp
Normal file
23
STLPORT/test/regression/find0.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define find0_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int find0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of find0_test:"<<endl;
|
||||
int numbers[10] = { 0, 1, 4, 9, 16, 25, 36, 49, 64 };
|
||||
|
||||
int* location;
|
||||
location = find((int*)numbers, (int*)numbers + 10, 25);
|
||||
cout << "Found 25 at offset " <<(location - numbers) << endl;
|
||||
return 0;
|
||||
}
|
||||
23
STLPORT/test/regression/find1.cpp
Normal file
23
STLPORT/test/regression/find1.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define find1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int find1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of find1_test:"<<endl;
|
||||
int years[] = { 1942, 1952, 1962, 1972, 1982, 1992 };
|
||||
|
||||
const unsigned yearCount = sizeof(years) / sizeof(years[0]);
|
||||
int* location = find((int*)years, (int*)years + yearCount, 1972);
|
||||
cout << "Found 1972 at offset " <<(location - years) << endl;
|
||||
return 0;
|
||||
}
|
||||
34
STLPORT/test/regression/findif0.cpp
Normal file
34
STLPORT/test/regression/findif0.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define findif0_test main
|
||||
#endif
|
||||
static bool odd(int a_)
|
||||
{
|
||||
return a_ % 2;
|
||||
}
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int findif0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of findif0_test:"<<endl;
|
||||
|
||||
int numbers[6] = { 2, 4, 8, 15, 32, 64 };
|
||||
|
||||
int* location = find_if((int*)numbers, (int*)numbers + 6, odd);
|
||||
if(location != numbers + 6)
|
||||
cout
|
||||
<< "Value "
|
||||
<< *location
|
||||
<< " at offset "
|
||||
<<(location - numbers)
|
||||
<< " is odd"
|
||||
<< endl;
|
||||
return 0;
|
||||
}
|
||||
38
STLPORT/test/regression/findif1.cpp
Normal file
38
STLPORT/test/regression/findif1.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define findif1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
static bool div_3(int a_)
|
||||
{
|
||||
return a_ % 3 ? 0 : 1;
|
||||
}
|
||||
int findif1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of findif1_test:"<<endl;
|
||||
|
||||
typedef vector <int> IntVec;
|
||||
IntVec v(10);
|
||||
for(int i = 0; i < v.size(); i++)
|
||||
v[i] =(i + 1) *(i + 1);
|
||||
IntVec::iterator iter;
|
||||
iter = find_if(v.begin(), v.end(), div_3);
|
||||
if(iter != v.end())
|
||||
cout
|
||||
<< "Value "
|
||||
<< *iter
|
||||
<< " at offset "
|
||||
<<(iter - v.begin())
|
||||
<< " is divisible by 3"
|
||||
<< endl;
|
||||
return 0;
|
||||
}
|
||||
26
STLPORT/test/regression/finsert1.cpp
Normal file
26
STLPORT/test/regression/finsert1.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <deque>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MAIN
|
||||
#define finsert1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int finsert1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of finsert1_test:"<<endl;
|
||||
char* array [] = { "laurie", "jennifer", "leisa" };
|
||||
|
||||
deque<char*> names;
|
||||
copy(array, array + 3, front_insert_iterator<deque <char*> >(names));
|
||||
deque<char*>::iterator i;
|
||||
for(i = names.begin(); i != names.end(); i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
26
STLPORT/test/regression/finsert2.cpp
Normal file
26
STLPORT/test/regression/finsert2.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <deque>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MAIN
|
||||
#define finsert2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int finsert2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of finsert2_test:"<<endl;
|
||||
char* array [] = { "laurie", "jennifer", "leisa" };
|
||||
|
||||
deque<char*> names;
|
||||
copy(array, array + 3, front_inserter(names));
|
||||
deque<char*>::iterator i;
|
||||
for(i = names.begin(); i != names.end(); i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
29
STLPORT/test/regression/foreach0.cpp
Normal file
29
STLPORT/test/regression/foreach0.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "fadapter.h"
|
||||
|
||||
#ifdef MAIN
|
||||
#define foreach0_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
static void print(int a_)
|
||||
{
|
||||
cout << a_ << ' ';
|
||||
}
|
||||
int foreach0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of foreach0_test:"<<endl;
|
||||
|
||||
int numbers[10] = { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 };
|
||||
|
||||
for_each(numbers, numbers + 10, ptr_proc(print));
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
31
STLPORT/test/regression/foreach1.cpp
Normal file
31
STLPORT/test/regression/foreach1.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#include "fadapter.h"
|
||||
|
||||
#ifdef MAIN
|
||||
#define foreach1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
static void print_sqr(int a_)
|
||||
{
|
||||
cout << a_ * a_ << " ";
|
||||
}
|
||||
int foreach1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of foreach1_test:"<<endl;
|
||||
|
||||
vector <int> v1(10);
|
||||
for(int i = 0; i < v1.size(); i++)
|
||||
v1[i] = i;
|
||||
for_each(v1.begin(), v1.end(), ptr_proc(print_sqr) );
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
4
STLPORT/test/regression/fstream.txt
Normal file
4
STLPORT/test/regression/fstream.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
this
|
||||
is
|
||||
a
|
||||
test
|
||||
129
STLPORT/test/regression/fstream1.cpp
Normal file
129
STLPORT/test/regression/fstream1.cpp
Normal file
@@ -0,0 +1,129 @@
|
||||
// Regression test for STL seekg
|
||||
|
||||
#include <cstdio> // I really like formatted output.
|
||||
#include <cstdarg>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
#ifndef cstd
|
||||
#ifdef _MSC_VER
|
||||
#define cstd
|
||||
#else
|
||||
#define cstd std
|
||||
#endif
|
||||
#endif
|
||||
|
||||
class Error : public std::exception
|
||||
{
|
||||
public:
|
||||
Error(const char *pszfmt, ...);
|
||||
const char *what() const;
|
||||
private:
|
||||
char mMessage[256];
|
||||
};
|
||||
|
||||
#define countof(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
||||
Error::Error(const char *pszfmt, ...)
|
||||
{
|
||||
using cstd::va_list;
|
||||
|
||||
cstd::va_list ap;
|
||||
va_start(ap, pszfmt);
|
||||
cstd::vsnprintf(mMessage, countof(mMessage), pszfmt, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
const char *Error::what() const
|
||||
{
|
||||
return mMessage;
|
||||
}
|
||||
|
||||
// usage: testseek filename
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (argc != 2) {
|
||||
throw Error("Wrong number of arguments (Usage: testseek filename)");
|
||||
}
|
||||
std::ifstream ifs;
|
||||
ifs.exceptions(std::ios::badbit);
|
||||
ifs.open(argv[1]);
|
||||
|
||||
// First pass: read contents of file into character vector
|
||||
std::vector<char> charvec;
|
||||
cstd::printf("First pass:\n");
|
||||
for(;;)
|
||||
{
|
||||
char ch;
|
||||
if (!ifs.get(ch)) {
|
||||
break;
|
||||
}
|
||||
cstd::printf("%c", ch);
|
||||
charvec.push_back(ch);
|
||||
}
|
||||
cstd::printf("First pass done\n");
|
||||
|
||||
// Second pass: get positions into pos vector, checking chars
|
||||
std::vector<std::ios::pos_type> posvec;
|
||||
ifs.clear(); // necessary?
|
||||
ifs.seekg(0);
|
||||
std::vector<char>::const_iterator char_it;
|
||||
cstd::printf("Second pass:\n");
|
||||
for(char_it = charvec.begin(); char_it != charvec.end(); ++char_it)
|
||||
{
|
||||
std::ios::pos_type pos = ifs.tellg();
|
||||
posvec.push_back(pos);
|
||||
char ch;
|
||||
if (!ifs.get(ch)) {
|
||||
break;
|
||||
}
|
||||
cstd::printf("%c", ch);
|
||||
if (ch != *char_it) {
|
||||
throw Error("Character mismatch: got '%c', expected '%c'",
|
||||
ch, *char_it);
|
||||
}
|
||||
}
|
||||
if (char_it != charvec.end()) {
|
||||
throw Error("Unexpected end of file");
|
||||
}
|
||||
cstd::printf("Second pass done\n");
|
||||
|
||||
// Third pass: seek to each saved position and read next char
|
||||
ifs.clear(); // necessary, but I don't like it
|
||||
std::vector<std::ios::pos_type>::const_iterator pos_it;
|
||||
cstd::printf("Third pass:\n");
|
||||
for(char_it = charvec.begin(), pos_it = posvec.begin();
|
||||
char_it != charvec.end(); ++char_it, ++pos_it)
|
||||
{
|
||||
ifs.seekg(*pos_it);
|
||||
char ch;
|
||||
if (!ifs.get(ch)) {
|
||||
throw Error("End of file when expecting '%c'", *char_it);
|
||||
}
|
||||
cstd::printf("%c", ch);
|
||||
if (ch != *char_it) {
|
||||
throw Error("Character mismatch: got '%c', expected '%c'",
|
||||
ch, *char_it);
|
||||
}
|
||||
}
|
||||
cstd::printf("Third pass done\n");
|
||||
cstd::printf("Test passed\n");
|
||||
std::cerr<<"Testing cerr...\n";
|
||||
std::cerr<<"Testing cerr"<<std::endl;
|
||||
std::cerr<<"Testing cerr with char "<<(char)'5'<<std::endl;
|
||||
std::cerr<<"Testing cerr with float "<<(float)5.555<<std::endl;
|
||||
std::cerr<<"Testing cerr with int "<<(int)5<<std::endl;
|
||||
|
||||
}
|
||||
catch (std::exception &e)
|
||||
{
|
||||
cstd::printf("\nCaught exception: %s\n", e.what());
|
||||
cstd::printf("Test failed!\n");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// end of program
|
||||
31
STLPORT/test/regression/func1.cpp
Normal file
31
STLPORT/test/regression/func1.cpp
Normal file
@@ -0,0 +1,31 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MAIN
|
||||
#define func1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
static bool bigger(int i_)
|
||||
{
|
||||
return i_ > 3;
|
||||
}
|
||||
int func1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of func1_test:"<<endl;
|
||||
|
||||
vector<int>v;
|
||||
v.push_back(4);
|
||||
v.push_back(1);
|
||||
v.push_back(5);
|
||||
int n = 0;
|
||||
count_if(v.begin(), v.end(), bigger, n);
|
||||
cout << "Number greater than 3 = " << n << endl;
|
||||
return 0;
|
||||
}
|
||||
33
STLPORT/test/regression/func2.cpp
Normal file
33
STLPORT/test/regression/func2.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MAIN
|
||||
#define func2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
static bool bigger_than(int x_, int y_)
|
||||
{
|
||||
return x_ > y_;
|
||||
}
|
||||
int func2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of func2_test:"<<endl;
|
||||
|
||||
std::vector<int>v;
|
||||
v.push_back(4);
|
||||
v.push_back(1);
|
||||
v.push_back(5);
|
||||
sort(v.begin(), v.end(), bigger_than);
|
||||
std::vector<int>::iterator i;
|
||||
for(i = v.begin(); i != v.end(); i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
28
STLPORT/test/regression/func3.cpp
Normal file
28
STLPORT/test/regression/func3.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define func3_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int func3_test(int, char**)
|
||||
{
|
||||
cout<<"Results of func3_test:"<<endl;
|
||||
vector<int>v;
|
||||
v.push_back(4);
|
||||
v.push_back(1);
|
||||
v.push_back(5);
|
||||
sort(v.begin(), v.end(), greater<int>());
|
||||
std::vector<int>::iterator i;
|
||||
for(i = v.begin(); i != v.end(); i++)
|
||||
cout << *i << endl;
|
||||
return 0;
|
||||
}
|
||||
175
STLPORT/test/regression/gcc-99r1.mak
Normal file
175
STLPORT/test/regression/gcc-99r1.mak
Normal file
@@ -0,0 +1,175 @@
|
||||
# ;;; -*- Mode:makefile;-*-
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# This requires GNU make.
|
||||
.SUFFIXES: .cc .cpp .o .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
memfunptr.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
# STAT_MODULE=stat.o
|
||||
OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = /lang/cygnus/99r1/bin/c++ -R/lang/cygnus/99r1/lib
|
||||
CXX = $(CC)
|
||||
|
||||
DEBUG_FLAGS= -D_STLP_DEBUG
|
||||
|
||||
# CXXFLAGS = -Wall -D_STLP_NO_OWN_IOSTREAMS -fhonor-std -D__HONOR_STD ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
# CXXFLAGS = -Wall -D_STLP_NO_OWN_IOSTREAMS ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${DEBUG_FLAGS} ${STL_VERSION_FLAGS}
|
||||
CXXFLAGS = -Wall ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${DEBUG_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
LIBS = -L../../lib -lstlport_gcc_stldebug -lm
|
||||
LIBSTDCXX =
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) ${REPO_FLAGS} $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | ./$(TEST_EXE) > $(TEST)
|
||||
|
||||
|
||||
.cc.o .cxx.o .C.o .cpp.o:
|
||||
${CXX} ${CXXFLAGS} ${DEBUG_FLAGS} ${REPO_FLAGS} -c -o $*.o $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN=1 $< -c -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $< $(STAT_MODULE) $(LIBSTDCXX) -lstdc++ $(LIBS) -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
$(STAT_MODULE): stat.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} -c $< -o $@
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -O3 -fno-exceptions -D_STLP_NO_EXCEPTIONS -S $< -o $*.s
|
||||
|
||||
%.i: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -E $< > $@
|
||||
|
||||
clean:
|
||||
-rm -rf *.exe *.out *.o *.rpo core *.out Templates.DB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
176
STLPORT/test/regression/gcc-hp11.mak
Normal file
176
STLPORT/test/regression/gcc-hp11.mak
Normal file
@@ -0,0 +1,176 @@
|
||||
# ;;; -*- Mode:makefile;-*-
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# This requires GNU make.
|
||||
.SUFFIXES: .cc .cpp .o .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
memfunptr.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
# STAT_MODULE=stat.o
|
||||
OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = c++
|
||||
CXX = $(CC)
|
||||
|
||||
DEBUG_FLAGS= -g -D_REENTRANT -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__ -D_STLP_DEBUG -D_STLP_USE_MALLOC
|
||||
DEBUG_FLAGS= -g -D_REENTRANT -D_POSIX_C_SOURCE=199506L -D__EXTENSIONS__ -D_STLP_USE_MALLOC
|
||||
|
||||
|
||||
CXXFLAGS = -Wall -D_STLP_NO_OWN_IOSTREAMS ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
# CXXFLAGS = -Wall ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
# LIBS = -L../../lib -lstlport_gcc_stldebug -lm
|
||||
LIBS= ${DEBUG_FLAGS} -lpthread -lm -lc
|
||||
LIBSTDCXX =
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) ${REPO_FLAGS} $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | ./$(TEST_EXE) > $(TEST)
|
||||
|
||||
|
||||
.cc.o .cxx.o .C.o .cpp.o:
|
||||
${CXX} ${CXXFLAGS} ${DEBUG_FLAGS} ${REPO_FLAGS} -c -o $*.o $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN=1 $< -c -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $< $(STAT_MODULE) $(LIBSTDCXX) -lstdc++ $(LIBS) -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
$(STAT_MODULE): stat.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} -c $< -o $@
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -O3 -fno-exceptions -D_STLP_NO_EXCEPTIONS -S $< -o $*.s
|
||||
|
||||
%.i: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -E $< > $@
|
||||
|
||||
clean:
|
||||
-rm -rf *.exe *.out *.o *.rpo core *.out Templates.DB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
174
STLPORT/test/regression/gcc-repo.mak
Normal file
174
STLPORT/test/regression/gcc-repo.mak
Normal file
@@ -0,0 +1,174 @@
|
||||
# ;;; -*- Mode:makefile;-*-
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# This requires GNU make.
|
||||
.SUFFIXES: .cc .cpp .o .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
memfunptr.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
# STAT_MODULE=stat.o
|
||||
OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = c++
|
||||
CXX = $(CC)
|
||||
|
||||
# DEBUG_FLAGS= -D_STLP_DEBUG
|
||||
|
||||
CXXFLAGS = -Wall -D_STLP_NO_OWN_IOSTREAMS -D_STLP_WHOLE_NATIVE_STD -fhonor-std -D__HONOR_STD ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
CXXFLAGS = -frepo -Wall -D_STLP_NO_OWN_IOSTREAMS ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
LIBS = -lm
|
||||
LIBSTDCXX =
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) ${REPO_FLAGS} $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | $(TEST_EXE) > $(TEST)
|
||||
|
||||
|
||||
.cc.o .cxx.o .C.o .cpp.o:
|
||||
${CXX} ${CXXFLAGS} ${DEBUG_FLAGS} ${REPO_FLAGS} -c -o $*.o $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN=1 $< -c -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $< $(STAT_MODULE) $(LIBSTDCXX) -lstdc++ $(LIBS) -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
$(STAT_MODULE): stat.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} -c $< -o $@
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -O3 -fno-exceptions -D_STLP_NO_EXCEPTIONS -S $< -o $*.s
|
||||
|
||||
%.i: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -E $< > $@
|
||||
|
||||
clean:
|
||||
-rm -rf *.exe *.out *.o *.rpo core *.out Templates.DB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
155
STLPORT/test/regression/gcc.gmake
Normal file
155
STLPORT/test/regression/gcc.gmake
Normal file
@@ -0,0 +1,155 @@
|
||||
# makefile for g++-2.95.1 tests
|
||||
# This requires GNU make.
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
|
||||
OBJ=.o
|
||||
REPO_FLAGS=
|
||||
.SUFFIXES: .cc .cpp $(OBJ) .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
DEBUG_FLAGS=
|
||||
CXX_EXTRA_FLAGS=
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
STAT_MODULE=stat$(OBJ)
|
||||
OBJECTS=$(LIST:%.cpp=%$(OBJ)) $(STAT_MODULE)
|
||||
EXECS=$(LIST:%.cpp=%.exe)
|
||||
TESTS=$(LIST:%.cpp=%.out)
|
||||
TEST_EXE=stl_test.exe
|
||||
TEST=stl_test.out
|
||||
|
||||
CXXFLAGS = -Wall $(STL_INCL) -I. $(CXX_EXTRA_FLAGS)
|
||||
LIBS = -lm
|
||||
|
||||
LIBSTDCXX =
|
||||
|
||||
all:
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS) stl_test.out
|
||||
# $(CXX) $(CXXFLAGS) $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | ./$(TEST_EXE) > $(TEST)
|
||||
|
||||
%$(OBJ): %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(DEBUG_FLAGS) $(REPO_FLAGS) -c $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN $<
|
||||
$(CXX) $(CXXFLAGS) $*$(OBJ) $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
clean:
|
||||
-rm -rf *.exe *.out *$(OBJ) *.rpo core *.out Templates.DB
|
||||
173
STLPORT/test/regression/gcc.mak
Normal file
173
STLPORT/test/regression/gcc.mak
Normal file
@@ -0,0 +1,173 @@
|
||||
# ;;; -*- Mode:makefile;-*-
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# This requires GNU make.
|
||||
.SUFFIXES: .cc .cpp .o .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
memfunptr.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
# STAT_MODULE=stat.o
|
||||
OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = c++
|
||||
CXX = $(CC)
|
||||
|
||||
DEBUG_FLAGS= -D_STLP_DEBUG
|
||||
|
||||
CXXFLAGS = -Wall -D_STLP_NO_OWN_IOSTREAMS ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
# CXXFLAGS = -Wall ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
# LIBS = -L../../lib -lstlport_gcc_stldebug -lm
|
||||
LIBSTDCXX =
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | ./$(TEST_EXE) > $(TEST)
|
||||
|
||||
|
||||
.cc.o .cxx.o .C.o .cpp.o:
|
||||
${CXX} ${CXXFLAGS} ${DEBUG_FLAGS} ${REPO_FLAGS} -c -o $*.o $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN=1 $< -c -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $< $(STAT_MODULE) $(LIBSTDCXX) -lstdc++ $(LIBS) -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
$(STAT_MODULE): stat.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} -c $< -o $@
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -O3 -fno-exceptions -D_STLP_NO_EXCEPTIONS -S $< -o $*.s
|
||||
|
||||
%.i: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -E $< > $@
|
||||
|
||||
clean:
|
||||
-rm -rf *.exe *.out *.o *.rpo core *.out Templates.DB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
174
STLPORT/test/regression/gcc3.mak
Normal file
174
STLPORT/test/regression/gcc3.mak
Normal file
@@ -0,0 +1,174 @@
|
||||
# ;;; -*- Mode:makefile;-*-
|
||||
# Generated automatically from Makefile.in by configure.
|
||||
# This requires GNU make.
|
||||
.SUFFIXES: .cc .cpp .o .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
memfunptr.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
# STAT_MODULE=stat.o
|
||||
OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = c++
|
||||
CXX = $(CC)
|
||||
|
||||
DEBUG_FLAGS= -D_STLP_DEBUG
|
||||
|
||||
CXXFLAGS = -Wall ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
# CXXFLAGS = -Wall ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
LIBS = -L../../lib -lstlport_gcc_stldebug -lm
|
||||
|
||||
LIBSTDCXX =
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
echo 'a string' | ./$(TEST_EXE) > $(TEST)
|
||||
|
||||
|
||||
.cc.o .cxx.o .C.o .cpp.o:
|
||||
${CXX} ${CXXFLAGS} ${DEBUG_FLAGS} ${REPO_FLAGS} -c -o $*.o $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN=1 $< -c -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $< $(STAT_MODULE) $(LIBSTDCXX) -lstdc++ $(LIBS) -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
$(STAT_MODULE): stat.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} -c $< -o $@
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) -O3 -fno-exceptions -D_STLP_NO_EXCEPTIONS -S $< -o $*.s
|
||||
|
||||
%.i: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -E $< > $@
|
||||
|
||||
clean:
|
||||
-rm -rf *.exe *.out *.o *.rpo core *.out Templates.DB
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
34
STLPORT/test/regression/gener1.cpp
Normal file
34
STLPORT/test/regression/gener1.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "fadapter.h"
|
||||
|
||||
#ifdef MAIN
|
||||
#define gener1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
static int cxxrand() { return rand();}
|
||||
|
||||
int gener1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of gener1_test:"<<endl;
|
||||
int numbers[10];
|
||||
#if defined(__MVS__)
|
||||
generate(numbers, numbers + 10, ptr_gen(cxxrand));
|
||||
#else
|
||||
generate(numbers, numbers + 10, cxxrand);
|
||||
#endif
|
||||
|
||||
for(int i = 0; i < 10; i++)
|
||||
cout << numbers[i] << ' ';
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
32
STLPORT/test/regression/gener2.cpp
Normal file
32
STLPORT/test/regression/gener2.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cstdlib>
|
||||
#include <iterator>
|
||||
|
||||
#include "fib.h"
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define gener2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
int gener2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of gener2_test:"<<endl;
|
||||
vector <int> v1(10);
|
||||
Fibonacci generator;
|
||||
generate(v1.begin(), v1.end(), generator);
|
||||
ostream_iterator<int> iter(cout, " ");
|
||||
copy(v1.begin(), v1.end(), iter);
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
39
STLPORT/test/regression/genern1.cpp
Normal file
39
STLPORT/test/regression/genern1.cpp
Normal file
@@ -0,0 +1,39 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "fadapter.h"
|
||||
|
||||
#ifdef MAIN
|
||||
#define genern1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
|
||||
static int cxxrand() { return rand();}
|
||||
|
||||
int genern1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of genern1_test:"<<endl;
|
||||
|
||||
#ifndef __STL_MEMBER_POINTER_PARAM_BUG //*TY 07/18/98 - added conditional
|
||||
// since ptr_gen() is not defined under this condition
|
||||
// (see xfunction.h)
|
||||
vector <int> v1(10);
|
||||
|
||||
generate_n(v1.begin(), v1.size(), ptr_gen(cxxrand));
|
||||
|
||||
for(int i = 0; i < 10; i++)
|
||||
cout << v1[i] << ' ';
|
||||
cout << endl;
|
||||
#endif // __STL_MEMBER_POINTER_PARAM_BUG //*TY 07/18/98 - added
|
||||
|
||||
return 0;
|
||||
}
|
||||
29
STLPORT/test/regression/genern2.cpp
Normal file
29
STLPORT/test/regression/genern2.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <iterator>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <cstdlib>
|
||||
#include "fib.h"
|
||||
|
||||
#ifdef MAIN
|
||||
#define genern2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int genern2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of genern2_test:"<<endl;
|
||||
|
||||
vector <int> v1(10);
|
||||
Fibonacci generator;
|
||||
generate_n(v1.begin(), v1.size(), generator);
|
||||
ostream_iterator<int> iter(cout, " ");
|
||||
copy(v1.begin(), v1.end(), iter);
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
24
STLPORT/test/regression/greateq.cpp
Normal file
24
STLPORT/test/regression/greateq.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
|
||||
#ifdef MAIN
|
||||
#define greateq_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int greateq_test(int, char**)
|
||||
{
|
||||
cout<<"Results of greateq_test:"<<endl;
|
||||
int array [4] = { 3, 1, 4, 2 };
|
||||
|
||||
sort(array, array + 4, greater_equal<int>());
|
||||
for(int i = 0; i < 4; i++)
|
||||
cout << array[i] << endl;
|
||||
return 0;
|
||||
}
|
||||
25
STLPORT/test/regression/greater.cpp
Normal file
25
STLPORT/test/regression/greater.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
// #include <functional>
|
||||
|
||||
|
||||
#ifdef MAIN
|
||||
#define greater_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int greater_test(int, char**)
|
||||
{
|
||||
cout<<"Results of greater_test:"<<endl;
|
||||
int array [4] = { 3, 1, 4, 2 };
|
||||
|
||||
sort(array, array + 4, greater<int>());
|
||||
for(int i = 0; i < 4; i++)
|
||||
cout << array[i] << endl;
|
||||
return 0;
|
||||
}
|
||||
42
STLPORT/test/regression/hmap1.cpp
Normal file
42
STLPORT/test/regression/hmap1.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <hash_map>
|
||||
#include <rope>
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
#ifdef MAIN
|
||||
#define hmap1_test main
|
||||
#endif
|
||||
|
||||
int hmap1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of hmap1_test:"<<endl;
|
||||
typedef hash_map<char, crope, hash<char>, equal_to<char> > maptype;
|
||||
maptype m;
|
||||
// Store mappings between roman numerals and decimals.
|
||||
m['l'] = "50";
|
||||
m['x'] = "20"; // Deliberate mistake.
|
||||
m['v'] = "5";
|
||||
m['i'] = "1";
|
||||
cout << "m['x'] = " << m['x'] << endl;
|
||||
m['x'] = "10"; // Correct mistake.
|
||||
cout << "m['x'] = " << m['x'] << endl;
|
||||
cout << "m['z'] = " << m['z'] << endl; // Note default value is added.
|
||||
cout << "m.count('z') = " << m.count('z') << endl;
|
||||
pair<maptype::iterator, bool> p =
|
||||
m.insert(pair<const char, crope>('c', crope("100")));
|
||||
if(p.second)
|
||||
cout << "First insertion successful" << endl;
|
||||
p = m.insert(pair<const char, crope>('c', crope("100")));
|
||||
if(p.second)
|
||||
cout << "Second insertion successful" << endl;
|
||||
else
|
||||
cout << "Existing pair " <<(*(p.first)).first
|
||||
<< " -> " <<(*(p.first)).second << endl;
|
||||
return 0;
|
||||
}
|
||||
47
STLPORT/test/regression/hmmap1.cpp
Normal file
47
STLPORT/test/regression/hmmap1.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <hash_map>
|
||||
#include <rope>
|
||||
|
||||
#ifdef MAIN
|
||||
#define hmmap1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
//struct hash<string>
|
||||
//{
|
||||
// size_t operator()(const string& s) const { return __stl_hash_string(s.c_str()); }
|
||||
//};
|
||||
|
||||
// typedef _Hashtable_node< pair< const char, int > >* nodeptr;
|
||||
// __STL_TYPE_TRAITS_POD_SPECIALIZE(nodeptr);
|
||||
|
||||
|
||||
int hmmap1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of hmmap1_test:"<<endl;
|
||||
typedef hash_multimap<char, int, hash<char>,equal_to<char> > mmap;
|
||||
mmap m;
|
||||
cout << "count('X') = " << m.count('X') << endl;
|
||||
m.insert(pair<const char,int>('X', 10)); // Standard way.
|
||||
cout << "count('X') = " << m.count('X') << endl;
|
||||
// m.insert('X', 20); // Non-standard, but very convenient!
|
||||
m.insert(pair<const char,int>('X', 20)); // jbuck: standard way
|
||||
cout << "count('X') = " << m.count('X') << endl;
|
||||
// m.insert('Y', 32);
|
||||
m.insert(pair<const char,int>('Y', 32)); // jbuck: standard way
|
||||
mmap::iterator i = m.find('X'); // Find first match.
|
||||
while(i != m.end()) // Loop until end is reached.
|
||||
{
|
||||
cout <<(*i).first << " -> " <<(*i).second << endl;
|
||||
i++;
|
||||
}
|
||||
int count = m.erase('X');
|
||||
cout << "Erased " << count << " items" << endl;
|
||||
return 0;
|
||||
}
|
||||
51
STLPORT/test/regression/hmset1.cpp
Normal file
51
STLPORT/test/regression/hmset1.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <hash_set>
|
||||
|
||||
#ifdef MAIN
|
||||
#define hmset1_test main
|
||||
#endif
|
||||
|
||||
// struct hash<string> {
|
||||
// size_t operator()(const string& s) const { return __stl_hash_string(s.c_str()); }
|
||||
//};
|
||||
|
||||
#if defined (__MVS__)
|
||||
#define star 92
|
||||
#else
|
||||
#define star 42
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef hash_multiset<char, hash<char>, equal_to<char> > hmset;
|
||||
// __STL_TYPE_TRAITS_POD_SPECIALIZE(_Hashtable_node<char>*);
|
||||
|
||||
|
||||
int hmset1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of hmset1_test:"<<endl;
|
||||
hmset s;
|
||||
cout << "count(" << star << ") = " << s.count(star) << endl;
|
||||
s.insert(star);
|
||||
cout << "count(" << star << ") = " << s.count(star) << endl;
|
||||
s.insert(star);
|
||||
cout << "count(" << star << ") = " << s.count(star) << endl;
|
||||
hmset::iterator i = s.find(40);
|
||||
if(i == s.end())
|
||||
cout << "40 Not found" << endl;
|
||||
else
|
||||
cout << "Found " << *i << endl;
|
||||
i = s.find(star);
|
||||
if(i == s.end())
|
||||
cout << "Not found" << endl;
|
||||
else
|
||||
cout << "Found " << *i << endl;
|
||||
int count = s.erase(star);
|
||||
cout << "Erased " << count << " instances" << endl;
|
||||
return 0;
|
||||
}
|
||||
183
STLPORT/test/regression/hpacc.mak
Normal file
183
STLPORT/test/regression/hpacc.mak
Normal file
@@ -0,0 +1,183 @@
|
||||
#
|
||||
# Makefile for HP aCC
|
||||
#
|
||||
|
||||
.SUFFIXES: .cc .cpp .o .exe .out
|
||||
|
||||
srcdir = .
|
||||
VPATH = .
|
||||
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
HP_VERSION=$(shell uname -r)
|
||||
ifeq (${HP_VERSION},B.10.20)
|
||||
PTHREAD_LIB=-lcma
|
||||
else
|
||||
PTHREAD_LIB=-lpthread
|
||||
endif
|
||||
|
||||
LIST = stl_test.cpp accum1.cpp accum2.cpp \
|
||||
adjdiff0.cpp adjdiff1.cpp adjdiff2.cpp \
|
||||
adjfind0.cpp adjfind1.cpp adjfind2.cpp \
|
||||
advance.cpp \
|
||||
alg1.cpp alg2.cpp alg3.cpp alg4.cpp alg5.cpp \
|
||||
bcompos1.cpp bcompos2.cpp \
|
||||
bind1st1.cpp bind1st2.cpp \
|
||||
bind2nd1.cpp bind2nd2.cpp \
|
||||
binsert1.cpp binsert2.cpp \
|
||||
binsrch1.cpp binsrch2.cpp \
|
||||
bnegate1.cpp bnegate2.cpp bvec1.cpp \
|
||||
copy1.cpp copy2.cpp copy3.cpp copy4.cpp \
|
||||
copyb.cpp copyb0.cpp \
|
||||
count0.cpp count1.cpp \
|
||||
countif1.cpp \
|
||||
deque1.cpp \
|
||||
divides.cpp \
|
||||
eqlrnge0.cpp eqlrnge1.cpp eqlrnge2.cpp \
|
||||
equal0.cpp equal1.cpp equal2.cpp \
|
||||
equalto.cpp \
|
||||
fill1.cpp filln1.cpp \
|
||||
find0.cpp find1.cpp \
|
||||
findif0.cpp findif1.cpp \
|
||||
finsert1.cpp finsert2.cpp \
|
||||
foreach0.cpp foreach1.cpp \
|
||||
func1.cpp func2.cpp func3.cpp \
|
||||
gener1.cpp gener2.cpp \
|
||||
genern1.cpp genern2.cpp \
|
||||
greateq.cpp greater.cpp \
|
||||
incl0.cpp incl1.cpp incl2.cpp \
|
||||
inplmrg1.cpp inplmrg2.cpp \
|
||||
inrprod0.cpp inrprod1.cpp inrprod2.cpp \
|
||||
insert1.cpp insert2.cpp \
|
||||
iota1.cpp \
|
||||
istmit1.cpp \
|
||||
iter1.cpp iter2.cpp iter3.cpp iter4.cpp \
|
||||
iterswp0.cpp iterswp1.cpp \
|
||||
less.cpp \
|
||||
lesseq.cpp \
|
||||
lexcmp1.cpp lexcmp2.cpp \
|
||||
list1.cpp list2.cpp list3.cpp list4.cpp \
|
||||
logicand.cpp logicnot.cpp \
|
||||
logicor.cpp \
|
||||
lwrbnd1.cpp lwrbnd2.cpp \
|
||||
map1.cpp \
|
||||
max1.cpp max2.cpp \
|
||||
maxelem1.cpp maxelem2.cpp \
|
||||
memfunptr.cpp \
|
||||
merge0.cpp merge1.cpp merge2.cpp \
|
||||
min1.cpp min2.cpp \
|
||||
minelem1.cpp minelem2.cpp \
|
||||
minus.cpp \
|
||||
mismtch0.cpp mismtch1.cpp mismtch2.cpp \
|
||||
mkheap0.cpp mkheap1.cpp \
|
||||
mmap1.cpp mmap2.cpp \
|
||||
modulus.cpp \
|
||||
mset1.cpp mset3.cpp mset4.cpp mset5.cpp \
|
||||
negate.cpp nequal.cpp \
|
||||
nextprm0.cpp nextprm1.cpp nextprm2.cpp \
|
||||
nthelem0.cpp nthelem1.cpp nthelem2.cpp \
|
||||
ostmit.cpp \
|
||||
pair0.cpp pair1.cpp pair2.cpp \
|
||||
parsrt0.cpp parsrt1.cpp parsrt2.cpp \
|
||||
parsrtc0.cpp parsrtc1.cpp parsrtc2.cpp \
|
||||
partsrt0.cpp \
|
||||
partsum0.cpp partsum1.cpp partsum2.cpp \
|
||||
pheap1.cpp pheap2.cpp \
|
||||
plus.cpp \
|
||||
pqueue1.cpp \
|
||||
prevprm0.cpp prevprm1.cpp prevprm2.cpp \
|
||||
ptition0.cpp ptition1.cpp \
|
||||
ptrbinf1.cpp ptrbinf2.cpp \
|
||||
ptrunf1.cpp ptrunf2.cpp \
|
||||
queue1.cpp \
|
||||
rawiter.cpp \
|
||||
remcopy1.cpp \
|
||||
remcpif1.cpp \
|
||||
remif1.cpp \
|
||||
remove1.cpp \
|
||||
repcpif1.cpp \
|
||||
replace0.cpp replace1.cpp replcpy1.cpp replif1.cpp \
|
||||
revbit1.cpp revbit2.cpp \
|
||||
revcopy1.cpp reverse1.cpp reviter1.cpp reviter2.cpp \
|
||||
rndshuf0.cpp rndshuf1.cpp rndshuf2.cpp \
|
||||
rotate0.cpp rotate1.cpp rotcopy0.cpp rotcopy1.cpp \
|
||||
search0.cpp search1.cpp search2.cpp \
|
||||
set1.cpp set2.cpp \
|
||||
setdiff0.cpp setdiff1.cpp setdiff2.cpp \
|
||||
setintr0.cpp setintr1.cpp setintr2.cpp \
|
||||
setsymd0.cpp setsymd1.cpp setsymd2.cpp \
|
||||
setunon0.cpp setunon1.cpp setunon2.cpp \
|
||||
sort1.cpp sort2.cpp \
|
||||
stack1.cpp stack2.cpp \
|
||||
stblptn0.cpp stblptn1.cpp \
|
||||
stblsrt1.cpp stblsrt2.cpp \
|
||||
swap1.cpp \
|
||||
swprnge1.cpp \
|
||||
times.cpp \
|
||||
trnsfrm1.cpp trnsfrm2.cpp \
|
||||
ucompos1.cpp ucompos2.cpp \
|
||||
unegate1.cpp unegate2.cpp \
|
||||
uniqcpy1.cpp uniqcpy2.cpp \
|
||||
unique1.cpp unique2.cpp \
|
||||
uprbnd1.cpp uprbnd2.cpp \
|
||||
vec1.cpp vec2.cpp vec3.cpp vec4.cpp vec5.cpp vec6.cpp vec7.cpp vec8.cpp \
|
||||
hmmap1.cpp hset2.cpp hmset1.cpp slist1.cpp hmap1.cpp string1.cpp bitset1.cpp
|
||||
|
||||
|
||||
# STAT_MODULE=stat.o
|
||||
OBJECTS = $(LIST:%.cpp=%.o) $(STAT_MODULE)
|
||||
EXECS = $(LIST:%.cpp=%.exe)
|
||||
TESTS = $(LIST:%.cpp=%.out)
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = aCC
|
||||
CXX = $(CC)
|
||||
|
||||
# DEBUG_FLAGS= -D_STLP_DEBUG
|
||||
|
||||
# CXXFLAGS = -Wl,+vshlibunsats -AA ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
CXXFLAGS = -AA ${STL_INCL} -I. ${CXX_EXTRA_FLAGS} ${STL_VERSION_FLAGS}
|
||||
|
||||
LIBS = +nostl -L../../lib -lstlport_aCC -lm ${PTHREAD_LIB}
|
||||
LIBSTDCXX =
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
#Run test each time
|
||||
#If test crashes, still move .out away
|
||||
$(TEST) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) ${REPO_FLAGS} $(OBJECTS) $(LIBS) -o $(TEST_EXE)
|
||||
-echo 'a string' | $(TEST_EXE) > $(TEST)
|
||||
mv -f $(TEST) $(TEST).bak
|
||||
|
||||
|
||||
.cc.o .cxx.o .C.o .cpp.o:
|
||||
${CXX} ${CXXFLAGS} ${DEBUG_FLAGS} ${REPO_FLAGS} -c -o $*.o $<
|
||||
|
||||
%.out: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -USINGLE -DMAIN=1 $< -c -o $*.o
|
||||
$(CXX) $(CXXFLAGS) $*.o $(STAT_MODULE) $(LIBS) -o $*.exe
|
||||
./$*.exe > $@
|
||||
-rm -f $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} $< $(STAT_MODULE) $(LIBSTDCXX) $(LIBS) -USINGLE -DMAIN -o istmit1
|
||||
echo 'a string' | ./istmit1 > istmit1.out
|
||||
-rm -f ./istmit1
|
||||
|
||||
$(STAT_MODULE): stat.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} ${REPO_FLAGS} -c $< -o $@
|
||||
|
||||
%.s: %.cpp
|
||||
$(CXX) $(CXXFLAGS) +O3 +noeh -D_STLP_NO_EXCEPTIONS -S $< -o $*.s
|
||||
|
||||
%.i: %.cpp
|
||||
$(CXX) $(CXXFLAGS) ${DEBUG_FLAGS} -E $< > $@
|
||||
clean:
|
||||
-rm -rf *.exe *.out *.o *.rpo core *.out Templates.DB
|
||||
|
||||
#Work around bug in compiler: disable inlining
|
||||
hmap1.o: hmap1.cpp
|
||||
aCC +d -g0 -Wl,+vshlibunsats -AA -I../../stlport -I. hmap1.cpp -c -o hmap1.o
|
||||
|
||||
33
STLPORT/test/regression/hset2.cpp
Normal file
33
STLPORT/test/regression/hset2.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
#include <hash_set>
|
||||
|
||||
#ifdef MAIN
|
||||
#define hset2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
// __STL_TYPE_TRAITS_POD_SPECIALIZE(_Hashtable_node<int>*);
|
||||
|
||||
int hset2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of hset2_test:"<<endl;
|
||||
hash_set<int, hash<int>, equal_to<int> > s;
|
||||
pair<std::hash_set<int, hash<int>, equal_to<int> >::const_iterator, bool> p = s.insert(42);
|
||||
if(p.second)
|
||||
cout << "Inserted new element " << *(p.first) << endl;
|
||||
else
|
||||
cout << "Existing element = " << *(p.first) << endl;
|
||||
p = s.insert(42);
|
||||
if(p.second)
|
||||
cout << "Inserted new element " << *(p.first) << endl;
|
||||
else
|
||||
cout << "Existing element = " << *(p.first) << endl;
|
||||
return 0;
|
||||
}
|
||||
158
STLPORT/test/regression/ibm390.mak
Normal file
158
STLPORT/test/regression/ibm390.mak
Normal file
@@ -0,0 +1,158 @@
|
||||
# ------------------------------------------------------
|
||||
# Makefile for IBM C/C++ for OS/390
|
||||
# ------------------------------------------------------
|
||||
# point this to proper location
|
||||
STL_INCL=-I../../stlport
|
||||
|
||||
# list of objects
|
||||
OBJECTS = stl_test.o accum1.o accum2.o \
|
||||
adjdiff0.o adjdiff1.o adjdiff2.o \
|
||||
adjfind0.o adjfind1.o adjfind2.o \
|
||||
advance.o \
|
||||
alg1.o alg2.o alg3.o alg4.o alg5.o \
|
||||
bcompos1.o bcompos2.o \
|
||||
bind1st1.o bind1st2.o \
|
||||
bind2nd1.o bind2nd2.o \
|
||||
binsert1.o binsert2.o \
|
||||
binsrch1.o binsrch2.o \
|
||||
bnegate1.o bnegate2.o bvec1.o \
|
||||
copy1.o copy2.o copy3.o copy4.o \
|
||||
copyb.o copyb0.o \
|
||||
count0.o count1.o \
|
||||
countif1.o \
|
||||
deque1.o \
|
||||
divides.o \
|
||||
eqlrnge0.o eqlrnge1.o eqlrnge2.o \
|
||||
equal0.o equal1.o equal2.o \
|
||||
equalto.o \
|
||||
fill1.o filln1.o \
|
||||
find0.o find1.o \
|
||||
findif0.o findif1.o \
|
||||
finsert1.o finsert2.o \
|
||||
foreach0.o foreach1.o \
|
||||
func1.o func2.o func3.o \
|
||||
gener1.o gener2.o \
|
||||
genern1.o genern2.o \
|
||||
greateq.o greater.o \
|
||||
incl0.o incl1.o incl2.o \
|
||||
inplmrg1.o inplmrg2.o \
|
||||
inrprod0.o inrprod1.o inrprod2.o \
|
||||
insert1.o insert2.o \
|
||||
iota1.o \
|
||||
istmit1.o \
|
||||
iter1.o iter2.o iter3.o iter4.o \
|
||||
iterswp0.o iterswp1.o \
|
||||
less.o \
|
||||
lesseq.o \
|
||||
lexcmp1.o lexcmp2.o \
|
||||
list1.o list2.o list3.o list4.o \
|
||||
logicand.o logicnot.o \
|
||||
logicor.o \
|
||||
lwrbnd1.o lwrbnd2.o \
|
||||
map1.o \
|
||||
max1.o max2.o \
|
||||
maxelem1.o maxelem2.o \
|
||||
memfunptr.o \
|
||||
merge0.o merge1.o merge2.o \
|
||||
min1.o min2.o \
|
||||
minelem1.o minelem2.o \
|
||||
minus.o \
|
||||
mismtch0.o mismtch1.o mismtch2.o \
|
||||
mkheap0.o mkheap1.o \
|
||||
mmap1.o mmap2.o \
|
||||
modulus.o \
|
||||
mset1.o mset3.o mset4.o mset5.o \
|
||||
negate.o nequal.o \
|
||||
nextprm0.o nextprm1.o nextprm2.o \
|
||||
nthelem0.o nthelem1.o nthelem2.o \
|
||||
ostmit.o \
|
||||
pair0.o pair1.o pair2.o \
|
||||
parsrt0.o parsrt1.o parsrt2.o \
|
||||
parsrtc0.o parsrtc1.o parsrtc2.o \
|
||||
partsrt0.o \
|
||||
partsum0.o partsum1.o partsum2.o \
|
||||
pheap1.o pheap2.o \
|
||||
plus.o \
|
||||
pqueue1.o \
|
||||
prevprm0.o prevprm1.o prevprm2.o \
|
||||
ptition0.o ptition1.o \
|
||||
ptrbinf1.o ptrbinf2.o \
|
||||
ptrunf1.o ptrunf2.o \
|
||||
queue1.o \
|
||||
rawiter.o \
|
||||
remcopy1.o \
|
||||
remcpif1.o \
|
||||
remif1.o \
|
||||
remove1.o \
|
||||
repcpif1.o \
|
||||
replace0.o replace1.o replcpy1.o replif1.o \
|
||||
revbit1.o revbit2.o \
|
||||
revcopy1.o reverse1.o reviter1.o reviter2.o \
|
||||
rndshuf0.o rndshuf1.o rndshuf2.o \
|
||||
rotate0.o rotate1.o rotcopy0.o rotcopy1.o \
|
||||
search0.o search1.o search2.o \
|
||||
set1.o set2.o \
|
||||
setdiff0.o setdiff1.o setdiff2.o \
|
||||
setintr0.o setintr1.o setintr2.o \
|
||||
setsymd0.o setsymd1.o setsymd2.o \
|
||||
setunon0.o setunon1.o setunon2.o \
|
||||
sort1.o sort2.o \
|
||||
stack1.o stack2.o \
|
||||
stblptn0.o stblptn1.o \
|
||||
stblsrt1.o stblsrt2.o \
|
||||
swap1.o \
|
||||
swprnge1.o \
|
||||
times.o \
|
||||
trnsfrm1.o trnsfrm2.o \
|
||||
ucompos1.o ucompos2.o \
|
||||
unegate1.o unegate2.o \
|
||||
uniqcpy1.o uniqcpy2.o \
|
||||
unique1.o unique2.o \
|
||||
uprbnd1.o uprbnd2.o \
|
||||
vec1.o vec2.o vec3.o vec4.o vec5.o vec6.o vec7.o vec8.o \
|
||||
hmap1.o hmmap1.o hset2.o hmset1.o slist1.o string1.o bitset1.o
|
||||
|
||||
TEST_EXE = stl_test.exe
|
||||
TEST = stl_test.out
|
||||
|
||||
CC = c++
|
||||
CXX = $(CC)
|
||||
DEBUG_FLAGS=
|
||||
# Use this for a debug version
|
||||
# DEBUG_FLAGS=-g
|
||||
CXXFLAGS = ${STL_INCL} ${DEBUG_FLAGS} -I. -W c,"langlvl(extended)"
|
||||
|
||||
check: $(TEST)
|
||||
|
||||
$(TEST) : $(TEST_EXE)
|
||||
echo 'a string' | $(TEST_EXE) > $(TEST)
|
||||
|
||||
$(TEST_EXE) : $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) $(OBJECTS) -o $(TEST_EXE)
|
||||
|
||||
.SUFFIXES: .cpp .o .exe .out .C
|
||||
|
||||
.cpp.o:
|
||||
_CXX_CXXSUFFIX=cpp $(CXX) $(CXXFLAGS) -c $<
|
||||
|
||||
.C.o:
|
||||
_CXX_CXXSUFFIX=C $(CXX) $(CXXFLAGS) -c $<
|
||||
|
||||
.cpp.out:
|
||||
_CXX_CXXSUFFIX=cpp $(CXX) $(CXXFLAGS) -c -USINGLE -DMAIN $<
|
||||
$(CXX) $(CXXFLAGS) $*.o -o $*.exe
|
||||
./$*.exe > $@
|
||||
rm -f $*.exe
|
||||
|
||||
.cpp.exe:
|
||||
_CXX_CXXSUFFIX=cpp $(CXX) $(CXXFLAGS) -c -USINGLE -DMAIN $<
|
||||
$(CXX) $(CXXFLAGS) $*.o -o $*.exe
|
||||
|
||||
istmit1.out: istmit1.cpp
|
||||
_CXX_CXXSUFFIX=cpp $(CXX) $(CXXFLAGS) -c -USINGLE -DMAIN $<
|
||||
$(CXX) $(CXXFLAGS) $*.o -o $*.exe
|
||||
echo 'a string' | ./$*.exe > $@
|
||||
rm -f ./$*.exe
|
||||
|
||||
clean:
|
||||
-rm -fr *.exe *.o *.obj *.out tempinc
|
||||
30
STLPORT/test/regression/incl0.cpp
Normal file
30
STLPORT/test/regression/incl0.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <iostream>
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef MAIN
|
||||
#define incl0_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int incl0_test(int, char**)
|
||||
{
|
||||
cout<<"Results of incl0_test:"<<endl;
|
||||
int numbers1[5] = { 1, 2, 3, 4, 5 };
|
||||
int numbers2[5] = { 1, 2, 4, 8, 16 };
|
||||
int numbers3[2] = { 4, 8 };
|
||||
|
||||
if(includes(numbers1, numbers1 + 5, numbers3, numbers3 + 2))
|
||||
cout << "numbers1 includes numbers3" << endl;
|
||||
else
|
||||
cout << "numbers1 does not include numbers3" << endl;
|
||||
if(includes(numbers2, numbers2 + 5, numbers3, numbers3 + 2))
|
||||
cout << "numbers2 includes numbers3" << endl;
|
||||
else
|
||||
cout << "numbers2 does not include numbers3" << endl;
|
||||
return 0;
|
||||
}
|
||||
36
STLPORT/test/regression/incl1.cpp
Normal file
36
STLPORT/test/regression/incl1.cpp
Normal file
@@ -0,0 +1,36 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define incl1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int incl1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of incl1_test:"<<endl;
|
||||
vector<int> v1(10);
|
||||
vector<int> v2(3);
|
||||
int i;
|
||||
for(i = 0; i < v1.size(); i++)
|
||||
{
|
||||
v1[i] = i;
|
||||
}
|
||||
if(includes(v1.begin(), v1.end(), v2.begin(), v2.end()))
|
||||
cout << "v1 includes v2" << endl;
|
||||
else
|
||||
cout << "v1 does not include v2" << endl;
|
||||
for(i = 0; i < v2.size(); i++)
|
||||
v2[i] = i + 3;
|
||||
if(includes(v1.begin(), v1.end(), v2.begin(), v2.end()))
|
||||
cout << "v1 includes v2" << endl;
|
||||
else
|
||||
cout << "v1 does not include v2" << endl;
|
||||
return 0;
|
||||
}
|
||||
58
STLPORT/test/regression/incl2.cpp
Normal file
58
STLPORT/test/regression/incl2.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
#ifdef MAIN
|
||||
#define incl2_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
static bool compare_strings(const char* s1_, const char* s2_)
|
||||
{
|
||||
return strcmp(s1_, s2_) < 0 ? 1 : 0;
|
||||
}
|
||||
int incl2_test(int, char**)
|
||||
{
|
||||
cout<<"Results of incl2_test:"<<endl;
|
||||
|
||||
char* names[] = { "Todd", "Mike", "Graham", "Jack", "Brett"};
|
||||
|
||||
const unsigned nameSize = sizeof(names)/sizeof(names[0]);
|
||||
vector <char*> v1(nameSize);
|
||||
for(int i = 0; i < v1.size(); i++)
|
||||
{
|
||||
v1[i] = names[i];
|
||||
}
|
||||
vector <char*> v2(2);
|
||||
|
||||
v2[0] = "foo";
|
||||
v2[1] = "bar";
|
||||
sort(v1.begin(), v1.end(), compare_strings);
|
||||
// cout << "v1 sorted;\n";
|
||||
sort(v2.begin(), v2.end(), compare_strings);
|
||||
// cout << "v1 sorted;\n";
|
||||
|
||||
bool inc = includes(v1.begin(), v1.end(),
|
||||
v2.begin(), v2.end(),
|
||||
compare_strings);
|
||||
if(inc)
|
||||
cout << "v1 includes v2" << endl;
|
||||
else
|
||||
cout << "v1 does not include v2" << endl;
|
||||
v2[0] = "Brett";
|
||||
v2[1] = "Todd";
|
||||
inc = includes(v1.begin(), v1.end(),
|
||||
v2.begin(), v2.end(),
|
||||
compare_strings);
|
||||
if(inc)
|
||||
cout << "v1 includes v2" << endl;
|
||||
else
|
||||
cout << "v1 does not include v2" << endl;
|
||||
return 0;
|
||||
}
|
||||
28
STLPORT/test/regression/inplmrg1.cpp
Normal file
28
STLPORT/test/regression/inplmrg1.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
// STLport regression testsuite component.
|
||||
// To compile as a separate example, please #define MAIN.
|
||||
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef MAIN
|
||||
#define inplmrg1_test main
|
||||
#endif
|
||||
|
||||
#if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
|
||||
using namespace std;
|
||||
#endif
|
||||
int inplmrg1_test(int, char**)
|
||||
{
|
||||
cout<<"Results of inplmrg1_test:"<<endl;
|
||||
int numbers[6] = { 1, 10, 42, 3, 16, 32 };
|
||||
|
||||
int i;
|
||||
for(i = 0; i < 6; i++)
|
||||
cout << numbers[i] << ' ';
|
||||
cout << endl;
|
||||
inplace_merge(numbers, numbers + 3, numbers + 6);
|
||||
for(i = 0; i < 6; i++)
|
||||
cout << numbers[i] << ' ';
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user